Seven people leave their bags outside a temple and returning after worshiping picked one bag each at random. In how many ways at least one and at most three of them get their correct bags?
a) 120
b) 360
c) 5040
d) 720