Hierarchical fingerprint verification