import sys input = sys.stdin.readline from collections import * for _ in range(int(input())): S = input()[:-1] for i in range(len(S)): if S[i]!='0': print(S[i:]) break