CREATE TABLE table_51978 ("Nat." TEXT, "Name" TEXT, "Moving to" TEXT, "Type" TEXT, "Transfer window" TEXT, "Transfer fee" TEXT)

What is the name of the person with a type of end of contract, nat of sco, and the Moving to is cardiff city?
SELECT "Name" FROM table_51978 WHERE "Type" = 'end of contract' AND "Nat." = 'sco' AND "Moving to" = 'cardiff city'
SELECT "Name" FROM "table_51978" WHERE "Moving to" = 'cardiff city' AND "Nat." = 'sco' AND "Type" = 'end of contract'