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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: A = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.r: D = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

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

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

d.z = j
d.o = c
g.t = j
g.v = j
g.u = j
g.p = j
g.x = d
b.s = i
b.y = d
b.o = j
b.q = c
h.t = d
h.y = l
h.r = c
h.s = i
h.p = b
j.p = g
i.t = j
i.v = j
i.u = j
i.p = j
i.x = d
c.t = d
c.y = l
c.r = h
c.s = g
c.p = b
l.s = g
l.y = d
l.o = j
l.q = h
assert b.q.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: A = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.r: D = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

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

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

d.z = j
d.o = c
g.t = j
g.v = j
g.u = j
g.p = j
g.x = d
b.s = i
b.y = d
b.o = j
b.q = c
h.t = d
h.y = l
h.r = c
h.s = i
h.p = b
j.p = g
i.t = j
i.v = j
i.u = j
i.p = j
i.x = d
c.t = d
c.y = l
c.r = h
c.s = g
c.p = b
l.s = g
l.y = d
l.o = j
l.q = h
assert b.q.r.y.txt == "l"