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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.v: A = None
        self.q: G = None
        self.w: A = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.u: E = None
        self.w: C = None
        self.y: D = None
        self.z: A = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.v: A = None
        self.q: G = None
        self.w: A = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.u: E = None
        self.w: C = None
        self.y: D = None
        self.z: A = None
        self.q: E = None
        self.txt = txt

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

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