Logic 29

What number should replace the question mark?

3254
 
5343
 
2406
 
4?7