#include<iostream>
#include<string>
#include<cstdlib>
#include<cstring>

using namespace std;

int main(){
	char num[100], damy[100], damy2[100];
	char now;
	string ans;
	int n, i, j, lng, cut = 0, l_damy;
	while(1){

		cin >> n;
		if(n == 0) break;
		cin >> num;


		for(i = 0; i < n; i ++){
			lng = strlen(num);
			now = num[0];
			for(j = 0; j < lng; j++){
				if(now == num[j]){
					cut ++;
					now = num[j];
				}
				else{
				}
			}

			ans = damy;
			l_damy = strlen(damy);
			for(j = 0; j < l_damy; j ++){
				num[j] = damy[j];
			}
		}
		cout << ans << endl;
	}

	return 0;
}