How do I reset my passcode without losing all of my data?

A

AC Question

So last night I put my hone down for a sec, and wen I came back my normal connect-the-dots passcode had been replaced by a pin. All of the people I was with claim that they did not change it. I tried inputting a random code once, and it told me that if I got it incorrect 9 more times, my phone would be reset to factory settings? What do I do? Thanks for the help!