I think theory that Twilight and her friends went back in time, raised small Celestia and Luna, then somehow turned into elements of harmony what Celestia and Luna used again Discord, and in future Celestia find out that pony who adopted and raised and teaches her is now a filly who will become her student.