My solutions for patmat