Friends for Never
Well, you've certainly surprised us. Your problemsetting work is quite good, and the CEO of AUCPL.inc has promoted you to problemsetting manager. Yes, this means you'll never code again. Instead, you'll be managing people! You like managing people... right?
The team we've assigned you is highly productive, except for two employees named and
. The team sits in a line in alphabetical order, but these two are always chatting with each other instead of getting any work done.
We do not want to fire them over this beautiful friendship, as the press would have an absolute field day. Instead, upper management has proposed creating a fake employee to seat between them.
Employees are seated in alphabetical (lexicographical) order by name.
Conveniently, all employees on this team have names of length . Therefore, this fake employee must have a name that fits between
and
in lexicographical order.
More specifically, you must find a name such that:
, and
in lexicographical order.
This ensures can be seated strictly between them.
Note: Lexicographical order compares strings like words in a dictionary. At the first position where they differ, the string with the smaller character is considered smaller. For example,
.
Break up this beautiful friendship by finding any valid name that can be placed strictly between
and
.
Input
The first line consists of a single integer
, the length of the names of
and
.
The next line consists of two strings and
, the names of the troublesome employees.
It is guaranteed that:
in lexicographical order
and
contain only lowercase English letters
- There exists at least one string
of length
such that
Output
Output any string of length
consisting of lowercase English letters such that
in lexicographical order.
must only contain lowercase, English characters. If there are multiple answers, output any of them.
Example
Input 1
3
ray tom
Output 1
sam
sam is the same length as ray and tom, and goes between them in alphabetical order, so this is an acceptable fake name.
Input 2
7
abcdefg abcexyz
Output 2
abcdxyz
Input 3
5
aaaaa aaaac
Output 3
aaaab
aaaab is the only valid solution for this case.
Comments