TP1 Pattern Recognition final