import std/editdistance;proc q():any=stdin.readLine let _=q();q().editDistance(q()).echo