Fixed multiplication_tables solution