class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: E = None
        self.y: D = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.v: A = None
        self.r: D = None
        self.z: C = None
        self.txt = txt

e = A("e")
f = B("f")
b = C("b")
g = D("g")
i = E("i")
k = D("k")
j = B("j")

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: A = None
        self.v: A = None
        self.r: D = None
        self.z: C = None
        self.txt = txt

e = A("e")
f = B("f")
b = C("b")
g = D("g")
i = E("i")
k = D("k")
j = B("j")

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