N in a row (or column)! N in a row

Input:

The character and a 2-Dimensional array.

The array with a size of N x N where 1 &lt;= N &lt;= 26, it will be filled randomly like so:

N = 1

A


N = 2

B | A
-----
A | B


N = 3

A | B | C
----------
B | A | B
----------
C | A | C


As N increases by 1, so does the number of letters. A = 1, B = 2, C = 3. There will always be N number of each letter. 
N = 3, there will be 3 As... 3 Bs... 3 Cs... 
N = 4, there will be 4 As... 4 Bs... 4 Cs... 4 Ds... 
N = 5, there will be 5 As... 5 Bs... 5 Cs... 5 Ds... 5 Es... 

Output:

The original matrix as well as a manipulated matrix where any given letter has N in a row (or column).

Manipulations occur by swapping two letters within the 2-D grid that are adjacent on the x or y axis. You may not swap characters over the boundaries of the array. I.E. You cannot swap Array[0][N-1] with Array[0][0]. You also may not swap characters diagonally.

Objective:

Your job is to pick a character C to solve for given N. Swap characters within the matrix so that there are N of C in the same row or column.

Examples:

N = 3, C = A

A | B | C
----------
B | A | B
----------
C | A | C


Swap array[0][0] (A) with array[1][0] (B)
resulting in 

B | A | C
----------
B | A | B
----------
C | A | C


Complete

N = 4, C = B

A | B | C | D
--------------
B | D | B | A
--------------
D | A | C | C
--------------
A | C | B | D


swap array[1][0] (B) with array[1][1] (D)

A | D | C | D
--------------
B | B | B | A
--------------
D | A | C | C
--------------
A | C | B | D


swap array[2][3] (B) with array[3][3] (D)

A | D | C | D
--------------
B | B | B | A
--------------
D | A | C | C
--------------
A | C | D | B


swap array[3][3] (B) with array[3][2] (C)

A | D | C | D
--------------
B | B | B | A
--------------
D | A | C | B
--------------
A | C | D | C


swap array[3][2] (B) with array[3][1] (A)

A | D | C | D
--------------
B | B | B | B
--------------
D | A | C | A
--------------
A | C | D | C


Complete!

Any letter can be chosen to solve for. As this is code-golf the shortest code wins!

Have Fun and Good Luck!
Python 2, 270 bytes

from random import*
e=lambda s,n:all(sum(map(ord,l))!=n*65for l in s)
R,C,d=randint,choice,[-1,1]
def w(a):
 print a;n=len(a);
 while e(a,n)and e(zip(*a),n):
    if n==2:x,y,w,z=0,0,0,1
    else:x,y=R(1,n-2),R(1,n-2);w,z=x+C(d),y+C(d)
    a[y][x],a[z][w]=a[z][w],a[y][x]
 print a

Always chooses A as character to complete a row/col. Performs random swaps until goal is reached.
Accepts the matrix as list of lists, usage for testing:
A=&quot;&quot;&quot;ADCD
BBBA
DACC
ACDB&quot;&quot;&quot;
a=[[c for c in l] for l in A.split('\n')]
w(a)