레벨2 문제 실패
def solution(dirs):
s, g = 0, 0
load = set()
for i in dirs:
if ( i == 'U' and s < 5):
load.add(((s, g), (s+1, g)))
s += 1
elif ( i == 'D' and s > -5):
load.add(((s-1, g), (s, g)))
s -= 1
elif ( i == 'L' and g > -5):
load.add(((s, g-1), (s, g)))
g -= 1
elif ( i == 'R' and g < 5):
load.add(((s, g), (s, g+1)))
g += 1
print(load)
answer = len(load)
return answer