MOD = 10**9 + 7 n_str = input().strip() rem = 0 for c in n_str: rem = (rem * 10 + int(c)) % MOD if rem == 1: print(0) else: print((rem - 1) % MOD)