def conv( input )
	input_a = input.split(//)

	oldc = input_a[ 0 ]
	n = 1
	output = ''

	1.upto( input_a.size - 1 ){ |i|
		if oldc == input_a[ i ]
			n += 1
		else 
			output += (n.to_s + oldc.to_s)
			oldc = input_a[ i ]
			n = 1
		end
	}
	if n > 0
		output += (n.to_s + oldc.to_s)
	end
	return output
end

ans = []
while (n  = $stdin.gets.chomp.to_i) != 0
	str = $stdin.gets.chomp
	n.times{
		newstr = conv( str )			
		str = newstr
	}	
	ans << str
end
ans.each{ |a| puts a }
