18. Replace the letters with digits so that in each row (column) there are three-digit numbers that are perfect squares. (Identical letters must correspond to identical digits, different letters to different digits.)

| $\mathbf{T}$ | $\mathbf{i}$ | $\mathbf{P}$ |
| :---: | :---: | :---: |
| $\mathbf{U}$ | $\mathbf{B}$ | $\mathbf{A}$ |
| $\mathbf{P}$ | $\mathbf{A}$ | $\mathbf{K}$ |
18. There are 13 three-digit numbers that are perfect squares and have no repeated digits in their representation: $169,196,256,289,324,361,529,576,625$, $729,784,841,961$. Among them, the ones that satisfy the condition are $729,256,961$ :

| 7 | 2 | 9 |
| :--- | :--- | :--- |
| 2 | 5 | 6 |
| 9 | 6 | 1 |