from itertools import accumulate for string in accumulate([[i] for i in input().split()]): print(" ".join(string))