class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.x: E = None
        self.r: F = None
        self.s: F = None
        self.o: F = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: A = None
        self.t: D = None
        self.txt = txt

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

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