Stringer

Time Limit: 1000 ms Memory Limit: 65536 KiB

Problem Description

Input

Output

Sample Input

2 5
2 3
3 0
2 3 1
0 0

Sample Output

babab
aabbbc

Hint

 

Source

2009 Mid-Atlantic Regional Programming Contest