An illustrative example is the conversion of the SMILES "C(OC)(SC)F" to the DeepSMILES "COC))SC))F". To convert this back to SMILES, a stack is used, similar to how RPN is interpreted. Each successive atom is connected to the atom on top of the stack (if one is present), and then it itself is placed on top of the stack. Close parentheses remove atoms from the top of the stack, such that the next atom to the added to the stack will attach to an atom 'lower down' on the stack. In this case, C, O and C are added to the stack one after the other, and joined to give COC. Next, the two close parentheses remove the C and then the O from the top of the stack. When the S is added, it attaches to single C on the stack giving C(OC)S, while the following C gives C(OC)SC. The two final parentheses remove the C and then S from the stack so that the last character F attaches to the original C again.