#include using std::sort; using std::cin; using std::cout; using std::endl; using std::string; int n, flag, axis; string inStr, ans; struct point { int x, y; char v; // value }; std::vector pt; struct point inf; bool comp(const point &a, const point &b) { if (a.v == b.v) { return (a.x == b.x) ? (a.y < b.y) : (a.x < b.x); } else { return a.v < b.v; } } int main() { cin >> n >> inStr; flag = 0, axis = 0; for (register int count = 0; count < n; ++count) { for (register int countB = 0; countB < count + 1; ++countB) { point newPt; newPt.v = inStr[flag]; newPt.y = count; newPt.x = axis + (countB << 1); ++flag; pt.push_back(newPt); // used for debug // cout<