# -*- coding: utf-8 -*-
"""
Created by Zhao Baoxin on 12/5/18
-------------------------------------------------
   File Name：     numsMergeToMaxNumber
   Description :
   Author :       zhaobx
   date：          12/5/18
-------------------------------------------------
   Change Activity:
                   12/5/18:
-------------------------------------------------
"""
import math
def merge_to_maximal_number():
    numLen = input()
    nums = input()

    