#include<iostream> using namespace std; int main() { int n, x; char ch; cin >> ch >> n; for (int i = 0; i < n; i++) { cin >>x; for (int i = 0; i < x; i++) { cout << ch; } cout << " "; } return 0; }