Restricted Row Magic Square Generation

Please Input a Magic Square (there is an example in the following textarea):


Constraint Condition: first row; last row.


Result:


Speed Test