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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.s: C = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: B = None
        self.y: D = None
        self.w: A = None
        self.r: B = None
        self.txt = txt

e = A("e")
k = B("k")
d = C("d")
b = D("b")
j = E("j")
h = E("h")
f = C("f")

e.q = j
e.u = k
e.x = k
k.p = d
k.w = e
k.v = j
d.w = k
d.y = k
d.z = k
d.t = e
d.s = f
b.s = h
b.t = k
b.p = e
j.q = e
j.w = e
j.u = k
j.r = k
j.y = b
h.q = e
h.w = e
h.u = k
h.r = k
h.y = b
f.w = k
f.y = k
f.z = k
f.t = e
f.s = d
assert b.s.y.s.q.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.s: C = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: B = None
        self.y: D = None
        self.w: A = None
        self.r: B = None
        self.txt = txt

e = A("e")
k = B("k")
d = C("d")
b = D("b")
j = E("j")
h = E("h")
f = C("f")

e.q = j
e.u = k
e.x = k
k.p = d
k.w = e
k.v = j
d.w = k
d.y = k
d.z = k
d.t = e
d.s = f
b.s = h
b.t = k
b.p = e
j.q = e
j.w = e
j.u = k
j.r = k
j.y = b
h.q = e
h.w = e
h.u = k
h.r = k
h.y = b
f.w = k
f.y = k
f.z = k
f.t = e
f.s = d
assert b.s.y.s.q.x.v.txt == "j"