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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.x: D = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.v: G = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.w: H = None
        self.y: G = None
        self.v: G = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

c = A("c")
b = B("b")
i = C("i")
a = D("a")
n = E("n")
m = F("m")
k = G("k")
e = H("e")
f = E("f")

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: C = None
        self.x: D = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.v: G = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: H = None
        self.w: H = None
        self.y: G = None
        self.v: G = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

c = A("c")
b = B("b")
i = C("i")
a = D("a")
n = E("n")
m = F("m")
k = G("k")
e = H("e")
f = E("f")

c.r = n
c.w = f
b.o = c
b.u = c
b.w = i
b.x = a
b.t = m
i.w = b
i.z = b
i.t = f
i.v = k
i.u = m
a.o = e
a.z = e
a.w = e
a.y = k
a.v = k
a.p = b
a.t = m
n.v = f
n.s = a
n.u = m
m.v = k
m.x = k
m.p = c
m.o = c
m.z = c
m.u = n
k.z = f
k.p = b
k.v = n
e.u = i
e.x = i
e.p = c
e.y = k
e.t = k
e.s = m
f.v = n
f.s = a
f.u = m
assert m.u.u.v.z.s.o.txt == "e"