#include #include #include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin>>n; vector c(10,0); for(int i = 1;i<=9;i++) cin>>c[i]; for(int i = 9;i>=1;i--){ for(int j = 0;j