title: Why is my answer wrong Codechef code - STNGAME?
body: <p><strong>The question is :</strong></p>
  <p>Initially, Alice and Bob both have a bag of N stones each with every stone having a lowercase alphabet written on it. Both players know the stones of the other player.</p>
  <p>Alice and Bob want to create a string S of length 2⋅N using the stones they have. They play a game to create the string. The rules of the game are as follows:</p>
  <p>Initially, all the indices of S are empty.
  Alice starts the game. The players take alternating turns. In each turn, the player can choose one of the stones from their bag and place it at any empty index i (1≤i≤2⋅N) of S.
  The game ends when both the players have used all their stones.
  Alice wants S to be as lexicographically small as possible while Bob wants S to be as lexicographically large as possible.
  Find the final string S formed by characters written on stones if both Alice and Bob play optimally!</p>
  <p>Note: A string X is lexicographically smaller than a string Y if and only if one of the following holds:</p>
  <p>X is a prefix of Y and X≠Y
  In the first position where X and Y differ, the string X has a letter that appears earlier in the alphabet than the corresponding letter in Y.
  Input Format
  The first line contains an integer T - the number of test cases. The description of T test cases follows:
  The first line of each test case contains an integer N - the number of stones each player has.
  The second line of each test case contains a string A of length N describing the stones in Alice's bag initially.
  The third line of each test case contains a string B of length N describing the stones in Bob's bag initially.
  Output Format
  For each test case, print the final string S formed if Alice and Bob play optimally.</p>
  <p><strong>My code :</strong></p>
  <pre><code>t = int(input())
  for _ in range(t):
      n = int(input())
      a = input()
      a = list(a)
      b = input()
      b = list(b)
      s = ''
      a.sort()
      b.sort(reverse = True)
  
      for i in range(2*n):
          if i %2 == 0:
              s += a[int(i/2)]
          else:
              s += b[int(i/2)]
      
      print(s)
  </code></pre>
  <p>I am getting correct results for the sample input cases, but after submitting my code it shows wrong answer for all the cases.
  Please Help.</p>