import turtle
t1 = turtle.Turtle()
t2 = turtle.Turtle()
t1.shape('turtle')
t2.hideturtle()
t2.pencolor('white')
t2_move =[]
while True:
direction = input('방향입력(l:left, r:right, q:종료) : ')
if direction == 'l':
t1.left(90)
t1.forward(100)
t2_move.append('l')
if direction == 'r':
t1.right(90)
t1.forward(100)
t2_move.append('r')
if direction == 'q':
break
if len(t2_move)==4 and t2_move[0]=='l':
t2.left(90)
t2.forward(100)
del t2_move[0]
if len(t2_move)==4 and t2_move[0]=='r':
t2.right(90)
t2.forward(100)
del t2_move[0]
print("종료")
turtle.mainloop()