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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.o: E = None
        self.t: D = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

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

j.t = f
b.o = d
b.y = a
f.p = b
f.q = j
f.u = h
f.s = h
f.y = k
n.z = b
h.z = k
h.w = j
h.t = m
a.r = n
a.w = d
a.p = k
a.q = j
e.y = f
e.r = b
e.u = b
e.o = h
e.t = n
e.q = a
m.y = f
m.r = b
m.u = b
m.o = h
m.t = n
m.q = a
d.z = b
k.y = f
k.r = b
k.u = b
k.o = h
k.t = d
k.q = a
assert m.y.q.t.q.t.u.w.t.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.o: E = None
        self.t: D = None
        self.q: F = None
        self.u: B = None
        self.txt = txt

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

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