Text this: Inverse design of mechanical metamaterial achieving a prescribed constitutive curve