class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

m = A("m")
h = B("h")
j = C("j")
b = D("b")
e = B("e")
i = B("i")
a = A("a")
g = A("g")
k = D("k")
l = A("l")

m.y = a
h.u = j
h.w = j
j.x = a
b.v = i
b.o = i
b.t = g
e.u = j
e.w = j
i.u = j
i.w = j
a.y = g
g.y = l
k.v = h
k.t = g
k.o = i
l.y = m
assert i.u.x.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

m = A("m")
h = B("h")
j = C("j")
b = D("b")
e = B("e")
i = B("i")
a = A("a")
g = A("g")
k = D("k")
l = A("l")

m.y = a
h.u = j
h.w = j
j.x = a
b.v = i
b.o = i
b.t = g
e.u = j
e.w = j
i.u = j
i.w = j
a.y = g
g.y = l
k.v = h
k.t = g
k.o = i
l.y = m
assert i.u.x.y.y.txt == "l"