C because python was too slow :(