#include #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int N; cin >> N; vector C(10); rep(i, 9) cin >> C[i + 1]; for (int i = 9; i >= 1; --i) { while (C[i]) { cout << i; C[i]--; } } cout << "\n"; return 0; }