data =[]
while (input = gets.to_i) != 0
  
  data << input.to_s

  if data.length == 2 
    str = data[1]
    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
    data = []
  end
end