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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.y: C = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

l.u = g
h.p = i
h.r = i
h.u = c
h.t = l
e.z = c
e.o = a
e.y = g
e.t = h
e.u = l
b.z = i
a.z = b
g.z = l
g.o = a
g.y = e
g.t = h
g.u = c
c.u = g
i.z = b
j.z = b
assert c.u.z.u.y.y.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.y: C = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

l.u = g
h.p = i
h.r = i
h.u = c
h.t = l
e.z = c
e.o = a
e.y = g
e.t = h
e.u = l
b.z = i
a.z = b
g.z = l
g.o = a
g.y = e
g.t = h
g.u = c
c.u = g
i.z = b
j.z = b
assert c.u.z.u.y.y.o.z.txt == "b"