using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
class Permutation
{
private void swap(ref char a, ref char b)
{
if (a == b) return;
a ^= b;
b ^= a;
...