分类题目。给出三个人的个人资料，包括姓名、年龄、职业和爱好。写一段程序对这些人进行分类，例如按年龄、职业或爱好分类。
Name: Amy, Age: 25, Profession: Teacher, Hobby: Reading

Name: John, Age: 35, Profession: Engineer, Hobby: Playing guitar

Name: Sarah, Age: 30, Profession: Writer, Hobby: Painting
可以根据以下分类对这三个人进行分组：

按年龄分类：Amy (25), John (35), Sarah (30)
按职业分类：Amy (Teacher), John (Engineer), Sarah (Writer)
按爱好分类：Amy (Reading), John (Playing guitar), Sarah (Painting)