print ("each player chooses 5 numbers to put into the list then picks 1 or 2 positions from the list on condition that they are adjacent. positions start from 0 to 9 from left to right. when there are no adjacent numbers players will enter a  position of 1 number and put any position of a removed number or a non existing position. the player to remove the last number wins the game.")
l=[]
while len(l)<5:
    x=int(input("player 1 input a number"))
    l.append(x)
print (l)
while len(l)<10:
    y=int(input("player 2 input a number"))
    l.append(y)
print(l)
while len(l)>0:
    if l==['','','','','','','','','','']:
        print("this player wins")
    else:
        pass
    if len(l)==10:
        print("player 1 pick x and y")
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input ("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print(l)
        print ("player 2 pick z and v")
        z=int(input("enter a position"))
        if z>len(l):
            print("move to next position")
            pass
        else:
            l[z]=''
        v=int(input("enter a position"))
        if v>len(l):
            print("move to next position")
            pass
        else:
            l[v]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 1")
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 2")
        z=int(input("enter a position"))
        if z>len(l):
            print("move to next position")
            pass
        else:
            l[z]=''
        v=int(input("enter a position"))
        if v>len(l):
            print("move to next position")
            pass
        else:
            l[v]=''
        print (l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 1")
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 2")
        z=int(input("enter a position"))
        if z>len(l):
            print("move to next position")
            pass
        else:
            l[z]=''
        v=int(input("enter a position"))
        if v>len(l):
            print("move to next position")
            pass
        else:
            l[v]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 1")
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 2")
        z=int(input("enter a position"))
        if z>len(l):
            print("move to next position")
            pass
        else:
            l[z]=''
        v=int(input("enter a position"))
        if v>len(l):
            print("move to next position")
            pass
        else:
            l[v]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 1")
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print ("move to player 2")
        z=int(input("enter a position"))
        if z>len(l):
            print("move to next position")
            pass
        else:
            l[z]=''
        v=int(input("enter a position"))
        if v>len(l):
            print("move to next position")
            pass
        else:
            l[v]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 1")
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        print("move to player 2")
        z=int(input("enter a position"))
        if z>len(l):
            print("move to next position")
            pass
        else:
            l[z]=''
        v=int(input("enter a position"))
        if v>len(l):
            print("move to next position")
            pass
        else:
            l[v]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        x=int(input("enter a position"))
        if x>len(l):
            print("move to next position")
            pass
        else:
            l[x]=''
        y=int(input("enter a position"))
        if y>len(l):
            print("move to next position")
            pass
        else:
            l[y]=''
        print(l)
        if l==['','','','','','','','','','']:
            print("this player wins")
            break
        else:
            pass
        
        
        
