class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: B = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

e = A("e")
d = B("d")
j = C("j")
i = D("i")
c = E("c")
m = D("m")
f = D("f")
k = D("k")
b = D("b")

e.q = j
e.s = j
e.u = d
e.t = c
d.x = j
j.t = c
i.q = c
i.w = k
i.x = k
i.s = j
i.u = j
c.w = d
m.q = c
m.w = b
m.s = j
m.u = j
m.x = f
f.q = c
f.w = i
f.s = j
f.u = j
f.x = b
k.q = c
k.w = b
k.s = j
k.u = j
k.x = f
b.q = c
b.w = k
b.s = j
b.u = j
b.x = m
assert e.t.w.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: B = None
        self.s: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

e = A("e")
d = B("d")
j = C("j")
i = D("i")
c = E("c")
m = D("m")
f = D("f")
k = D("k")
b = D("b")

e.q = j
e.s = j
e.u = d
e.t = c
d.x = j
j.t = c
i.q = c
i.w = k
i.x = k
i.s = j
i.u = j
c.w = d
m.q = c
m.w = b
m.s = j
m.u = j
m.x = f
f.q = c
f.w = i
f.s = j
f.u = j
f.x = b
k.q = c
k.w = b
k.s = j
k.u = j
k.x = f
b.q = c
b.w = k
b.s = j
b.u = j
b.x = m
assert e.t.w.x.t.txt == "c"