Task 12 in Pascal