Lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. Print the minimum lucky number which has the sum of digits equal to N.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer N.
For each test case, Print the minimum lucky number. If there is no such lucky number print "-1".
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.