import sys def list_conect(l): ans = "" for l_i in l: ans += l_i return ans S = "0000000000" l = list(S) print(list_conect(l)) old_ck, rock = map(str, input().split()) old_ck = int(old_ck) if old_ck == 10: sys.exit() print(list_conect(l)) i = 0 while True: ck, rock = map(str, input().split()) ck = int(ck) if ck == 10: sys.exit() if old_ck == ck: M = int(l[i]) M += 1 l[i] = str(M) elif old_ck < ck: i += 1 elif old_ck > ck: M = int(l[i]) M -= 1 l[i] = str(M) i += 1 ck += 1 old_ck = ck print(list_conect(l))