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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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