Simulate the Japanese soroban abacus and compute the value represented by its bead positions.
You are given the state of a Japanese soroban (abacus) after some digits have been set. The abacus represents a decimal number using multiple columns, where each column stores one digit from 0 to 9.
For each column, determine the digit encoded by the arrangement of beads, then output the full number represented by the soroban.
The key idea is to read each column independently and combine the digits from left to right as a decimal number.
Print the decimal number represented by the soroban state.
Example 1
Input
3 0 1 2
Output
12
Explanation
Reading the three columns as digits gives 0, 1, and 2; the leading zero does not change the numeric value, so the result is 12.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.