YOU mean that you did not make a note of the wires connected, before pulling apart something you do not have a clue about. A thermostat, will normally have only two wires, sometimes three. IF you are unable to sort that out, you should not be doing it. YOU are dangerous. FIRE risk. Call the fire brigade.
SD, May 2012