class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: G = None
        self.r: A = None
        self.z: G = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

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

m.q = e
m.p = e
m.x = n
m.o = k
n.t = k
k.o = n
h.p = n
e.z = b
e.r = i
i.z = d
i.p = k
i.x = h
i.t = g
i.q = n
i.y = n
i.s = m
f.r = e
f.v = h
f.t = k
f.x = m
f.s = i
f.z = g
b.x = e
b.o = f
b.r = m
b.p = m
b.z = g
b.y = i
d.o = n
g.r = e
g.v = h
g.t = k
g.x = m
g.s = i
g.z = f
assert h.p.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: G = None
        self.r: A = None
        self.z: G = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

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

m.q = e
m.p = e
m.x = n
m.o = k
n.t = k
k.o = n
h.p = n
e.z = b
e.r = i
i.z = d
i.p = k
i.x = h
i.t = g
i.q = n
i.y = n
i.s = m
f.r = e
f.v = h
f.t = k
f.x = m
f.s = i
f.z = g
b.x = e
b.o = f
b.r = m
b.p = m
b.z = g
b.y = i
d.o = n
g.r = e
g.v = h
g.t = k
g.x = m
g.s = i
g.z = f
assert h.p.t.o.txt == "n"