Class codes