Write a program that, given two numbers and , prints the digits of in base as shown in the examples. For every digit , print a line with capital exes. Print the digits from right to left.
Input consists of a natural number between 1 and , followed by a natural number between 2 and 100.
For every digit
of
represented in base
,
and starting from the digit with less weight, print a line of size
made up of only ‘X’. Print a line with 10 dashes at the
beginning and at the end of the output.
Input
1984 10
Output
---------- XXXX XXXXXXXX XXXXXXXXX X ----------
Input
42 2
Output
---------- X X X ----------
Input
19 20
Output
---------- XXXXXXXXXXXXXXXXXXX ----------