Step 4 of 17 of the InChI walkthrough. Numbering starts by sorting the atoms on properties that do not depend on how the structure was drawn. InChI uses three such invariants, in this order: the element in Hill order — carbon first, others alphabetically, hydrogen last — then the number of connections to heavy atoms, then the number of attached hydrogens. Sort on those and caffeine already falls into six classes.
It opens on CN1C=NC2=C1C(=O)N(C)C(=O)N2C, drawn live, so the layer under discussion changes as you change the structure.
Convert a structure to its InChI and InChIKey and back, convert a whole CSV, XLSX or SDF file, learn how the identifier is derived, and practise writing its layers. The InChI engine is WebAssembly running in your browser, so the tool needs JavaScript — and nothing you open ever leaves your machine.