coin = [25,10,5,1] for _ in range(int(input())): n = int(input()) res = [] for c in coin: res.append(n//c) n%=c print(*res)