@Override
    public String toString() {
        if (right) {
            return "Right(" + value + ')';
        } else {
            return "Left(" + value + ')';
        }
    }
@Test
    void testToString() {
        assertEquals("Right(1)", right.toString());
        assertEquals("Left(A)", left.toString());
    }