Pentominos

A pentomino consists of five equal-sized squares attached edge-to-edge to form some shape. There are twelve possiblepentominos that can be formed in this way (plus their reflections and rotations). See the picture on the right. Something that has been keeping people oc- cupied since the late 50’s is to find a way to form a rectangle of a given size using the 12 different pentominos Write a program that reads 4 lines contain- ing two numbers between 1 and 8. These num- bers represent 4 different cells in an 8×8 square. The program must determine if it is possible to cover the remaining 60 cells using the 12 different types of pentominos. The solution may use a given type of pentomino more than once, or not at all. Input The input file contains several test cases. The first line of the input contains the number of datasets, followed by a blank line. Each dataset has 4 lines containing two numbers between 1 and 8. These numbers represent 4 different cells in an 8 × 8 square. Two consecutive datasets are separated by a blank line. Output For each test case, the output from the program will show the square filled with pentominos. Each pentomino in the output must be drawn using a different character from ‘a’ to ‘l’. The blocked cells should be drawn using the ‘’ character. Your program needs to only find one solution. If no solution exists, ‘No solution.’ should be printed. Print a blank line between two consecutive outputs. Sample Input 1 35 45 55 65 Sample Output aaaaabcc deeebbbc dddebcc

2/2 ffdeggg hffiggj hfii*jjj hiikkklj hhkkllll