A powerful earthquake shook buildings in Mexico City on Tuesday.