Powerful Number
easy
1. You are given three numbers A, B, and X. 2. You have to print all-powerful numbers that have value less than or equal to X. 3. A number is powerful if it is equal to x^i + y^j for i >= 0 and j >= 0.
Constraints
1 <= A,B <= 100 1 <= X <= 10^6
Format
Input
Three numbers A, B, and X.
Output
Space-separated integers representing powerful numbers.