Smith normal forms of incidence matrices