class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.r: C = None
        self.z: C = None
        self.p: E = None
        self.s: D = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: G = None
        self.t: C = None
        self.u: C = None
        self.x: C = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.x: A = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: G = None
        self.t: C = None
        self.u: C = None
        self.x: C = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.x: A = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

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

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