Random Digital Exponentiation

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

In a random digital exponentiation (RDE) cipher, each digit of a number aa is raised to a certain power which is determined by a randomly chosen encryption key. The encrypted number is the number that results when each digit is replaced with its power at the corresponding place value.

For instance, for a=243a = 243 and an encryption key of 7 4 3, the encrypted value bb would be b=27×102+44×10+33=15,387b = 2^7 \times 10^2 + 4^4 \times 10 + 3^3 = 15\\,387.

Given a plaintext value aa and an encrypted value bb, find the encryption key that was used!

입력

The input will contain a single test case containing two numbers aa and bb (0ab2,147,483,6470 \le a \le b \le 2\\,147\\,483\\,647).

출력

Print the encryption key, which is the list of exponents to which each digit in aa was raised, separated by spaces, starting from the leftmost digit's exponent. Each exponent should be a natural number. You are guaranteed that the encryption key exists and is unique.