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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: E = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: E = None
        self.x: C = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: E = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: E = None
        self.x: C = None
        self.u: D = None
        self.z: C = None
        self.txt = txt

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

j.q = g
j.y = g
j.u = i
j.t = i
j.o = b
n.o = i
n.q = i
n.w = j
g.q = i
b.o = g
b.q = l
b.r = i
i.t = g
i.x = g
i.z = g
i.q = l
i.u = h
a.q = g
a.y = g
a.u = i
a.t = i
a.o = b
d.o = i
d.q = i
d.w = a
h.o = g
h.q = i
h.r = l
l.t = g
l.x = g
l.z = g
l.q = i
l.u = b
assert g.q.u.r.u.q.t.q.txt == "i"