n = int(input()) for _ in range(n): print(input().lstrip("0"))