@Override
  public char[] swap(char[] S, int first, int second) {
    char temp = S[first];
    S[first] = S[second];
    S[second] = temp;