aabac
3
1 3 a
2 4 b
1 5 c
