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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.z: D = None
        self.u: B = None
        self.q: B = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.x: D = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

m = A("m")
k = B("k")
c = C("c")
b = D("b")
f = E("f")
j = F("j")
d = G("d")
e = D("e")
a = D("a")
n = D("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.z: D = None
        self.u: B = None
        self.q: B = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.x: D = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

m = A("m")
k = B("k")
c = C("c")
b = D("b")
f = E("f")
j = F("j")
d = G("d")
e = D("e")
a = D("a")
n = D("n")

m.q = k
m.u = j
m.p = e
m.s = f
k.p = j
c.v = k
c.x = f
c.t = a
c.r = j
b.w = f
b.o = j
b.u = j
f.r = c
f.p = j
f.z = e
f.u = k
f.q = k
f.s = d
f.x = a
j.o = b
d.y = c
d.r = c
d.x = n
d.t = j
d.z = f
e.w = f
e.o = j
e.u = j
a.w = f
a.o = j
a.u = j
n.w = f
n.o = j
n.u = j
assert a.w.u.p.o.w.s.t.txt == "j"