The WWI subs in Germany were classed by prefix before the sub number .
here is a list of sub classes.
U1 only sub in class.
U2 only sub in class.
U3 class subs # 3 through#22
U23 class subs# 23 through # 41
U42 only sub in class.
U43 class sub #43 through # 65
U66 class # 66 through #70
U71 class type UE (minelayers) # 71 through #80
U81class MS U-boats #81 through #116 and #158 through #172.
U117 class # 117 through #126
U 151 class #151 through #157
UA (type UA) only sub in class
UB1 class (type UB1) # UB1 through UB17
UB18 class (type UB2) # UB 18 through UB47
UB48 class (type UB3) # UB48 through #UB115 and UB117 through UB249
UC1 (type UC1) # UC1 through UC15
UC16 class (type UC2) # UC16 through UC79
UC80 (type UC3) #UC80 through UC192
US1 class # US1 through US4
there were several other classes of U- boats that were never compleated or were only on paper so I didnt list them
If your interested in U-boats I highly reccommend the book ; German Warships 1815-1945
Volume # 2
U-boats and Mine warefare vessels
.