class MyArray<T implements IComparable> extends Array<T> {
    MyArray(Array<T> value) {
        self.setValue(value);
    }

    Array<T> method() {
        Array<T> result = new Array<T>();
        result.setValue(self);
        return result;
    }

    virtual MyArray<T> clone() {
        MyArray<T> new_array = new MyArray<T>();
        new_array.setValue(self);
        return new_array;
    }
}

class MyString extends String {
    MyString(String value) {
        self.setValue(value);
    }

    String method() {
        String result = new String();
        result.setValue(self);
        return result;
    }

    virtual MyString clone() {
        MyString new_string = new MyString();
        new_string.setValue(self);
        return new_string;
    }
}
