data = []
File.open('input.txt') do |file|
  while line = file.gets
    data << line.to_s
  end
end

str = data[1].chomp

for i in 1..data[0].to_i
  temp_str = ""
  count = 1
  for j in 0..str.length-1
    if str[j] == str[j+1] then
      count += 1
    else
      temp_str << "#{count}#{str[j]}"
      count = 1
    end
  end
  str = temp_str
end

puts str