Problem E: 打印三元组

Problem E: 打印三元组

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

当 lns="http://www.w3.org/1998/Math/MathML">0abc 时,称 lns="http://www.w3.org/1998/Math/MathML">a,b,c 为上升三元组。

给定一个整数 lns="http://www.w3.org/1998/Math/MathML">n,请输出所有三数之和等于 lns="http://www.w3.org/1998/Math/MathML">n 的上升三元组。

若有多个三元组满足条件,则首先输出第一项较小的三元组,若第一项相等,则先输出第二项较小的三元组。

Input

  • 单个整数表示 lns="http://www.w3.org/1998/Math/MathML">n
0≤n≤2000

Output

  • 若干行,每行三个自然数,中间用一个空格分开

Sample Input Copy

2

Sample Output Copy

0 0 2
0 1 1