#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int counts[11];
int t;
int main()
{
    memset(counts,0,sizeof(counts));
    for(int i=0;i<10;i++)
    {
        scanf("%d",&t);
        counts[i]+=t;
    }
    for(int i=1;i<=9;i++) if(counts[i]) {printf("%d",i);
    counts[i]--;
    break;}
    for(int i=0;i<=9;i++) while(counts[i]--) printf("%d",i);
    printf("\n");
}