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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.t: F = None
        self.r: B = None
        self.u: D = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

e.t = m
e.z = n
e.r = j
e.s = i
a.u = d
a.v = e
m.z = a
m.v = a
m.r = a
m.t = n
m.u = d
m.s = d
m.p = i
d.u = j
d.r = a
d.t = e
j.s = m
j.o = e
j.t = d
n.v = e
n.z = j
n.t = m
n.w = m
n.u = i
f.p = i
f.u = j
f.o = j
f.t = e
f.v = e
c.r = j
c.p = m
c.z = m
i.p = f
i.u = j
i.o = j
i.t = e
i.v = e
assert f.p.v.s.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: F = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.t: F = None
        self.r: B = None
        self.u: D = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

e.t = m
e.z = n
e.r = j
e.s = i
a.u = d
a.v = e
m.z = a
m.v = a
m.r = a
m.t = n
m.u = d
m.s = d
m.p = i
d.u = j
d.r = a
d.t = e
j.s = m
j.o = e
j.t = d
n.v = e
n.z = j
n.t = m
n.w = m
n.u = i
f.p = i
f.u = j
f.o = j
f.t = e
f.v = e
c.r = j
c.p = m
c.z = m
i.p = f
i.u = j
i.o = j
i.t = e
i.v = e
assert f.p.v.s.o.s.txt == "m"