1771: 未来数列

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:6 Solved:18

Description

联欢会上,主持人先在黑板上写了四个数字,分别是:2,0,1,9,然后说:“这串数字从第五个数起,每一个数都是它前四数字之和的个位数字”。请你打印输出这个数列的前n项。

Input

一个整数n表示项数

Output

输出一行:n个数字,表示所求数列的前n项。

Sample Input Copy

10

Sample Output Copy

2 0 1 9 2 2 4 7 5 8

HINT

  • 对于lns="http://www.w3.org/1998/Math/MathML">20\%的数据:lns="http://www.w3.org/1998/Math/MathML">1<n<100
  • 对于lns="http://www.w3.org/1998/Math/MathML">45\%的数据:lns="http://www.w3.org/1998/Math/MathML">1<n<1000
  • 对于lns="http://www.w3.org/1998/Math/MathML">85\%的数据:lns="http://www.w3.org/1998/Math/MathML">1<n<10000
  • 对于lns="http://www.w3.org/1998/Math/MathML">100\%的数据:lns="http://www.w3.org/1998/Math/MathML">1<n<100000