You may need to put the phone into DFU mode and restore from that. Use 12.5.1 to restore it.
To enter DFU mode hold home and lock buttons until the Apple logo appears, continue to hold them until the prompt appears to plug into iTunes. iTunes should respond with "Found a phone in recovery mode".
If this phone is jail broken, ignore everything I just said. This is only for a stock iPhone.
its my friends phone he gave. when he gave me there was problem in sim card, it was stuck on searching, and without sim card, I didn't maked phone start, there was problem like that. I don't know which ios it was. and I downloaded iTunes and tried to restore phone but Error (1) in 60%. now when I start phone stuck in recovery/ (sory for bad English)