Rating:

I always hated history class. I thought history would never come in handy.

It contained two files:
encrypt.py
ciphertext.txt

On reading the python code we can easily know that;
Lowercase chars have been substituted by other Lowercase char.
All other are where they are suppose to be.

We even know flag has timctf in start.
So by simple reverse subsitution we get the flag as:
timctf{Ps3udO_R4NdoM_1S_Not_RAnD0M}

Original writeup (https://github.com/Lunarantic/CTF_writeups/tree/master/timisoaractf/Back_in_Time).