ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

Timus Top Coders: First Challenge

About     Problems     Submit solution     Judge status     Standings
Contest is over

H. Jedi Riddle

Time limit: 1.0 second
Memory limit: 64 MB

Background

System administrator Vasily Slipman, also known as Jedi Master, was an outstanding jester. He enciphered gigabyte archive with... Not with cartoon films for children, of course. Well, you have already understood with what. To cut a long story short, Vasily enciphered the archive using a key formed by six unknown numbers, and then he died. Strange inscriptions written by the decedent were found on the surface of his computer’s case. These inscriptions may cast light on the origin of those six numbers which are so essential for people.
It appeared that the greatest human Sins in Mr. Slipman’s opinion are Fear, Anger and Hatred. By the way, nothing was said about terrorism. Hence the greatest human Virtues are Valor, Calmness and Love. Vasily assigned a special Number to each of the Sins and the Virtues. The Numbers of the Sins were found, and now the time has come to calculate the Numbers of the Virtues.

Problem

Let us denote the Number of Fear as A, the Number of Anger as B, the Number of Hatred as C, the Number of Valor as X, the Number of Calmness as Y and the Number of Love as Z. Mr. Slipman chose the Numbers A, B and C so that C-1 is divisible both by A and B, i.e. (C-1) modulo A = (C-1) modulo B = 0. You are to find the integer Numbers X, Y and Z in order to satisfy the following strange equation: X^A + Y^B = Z^C. The inscriptions tell us that X, Y and Z should not be less than 1 and more than 10^50. It was the will of the decedent.

Input

The only line contains the integer Numbers A, B and C (1 ≤ A, B, C ≤ 32).

Output

You should output the desired Numbers X, Y and Z. Each Number should be printed in a separate line. If the problem has several solutions, you should output any of them.

Sample

inputoutput
2 2 3
10
5
5
Problem Author: Ilya Grebnov, Dmitry Kovalioff, Nikita Rybak
Problem Source: Timus Top Coders: First Challenge
To submit the solution for this problem go to the Problem set: 1428. Jedi Riddle