class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.o: E = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

f.y = n
f.r = n
f.s = a
f.o = b
f.p = l
l.z = b
l.q = m
n.y = m
n.v = c
n.s = h
n.x = b
n.z = a
n.t = f
c.s = m
c.v = b
b.w = m
b.z = m
b.t = c
b.s = f
b.r = a
i.s = b
m.y = l
m.z = b
m.x = b
m.w = i
m.v = f
m.q = f
a.w = n
a.x = f
a.y = i
h.s = b
assert m.w.s.s.s.x.s.w.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.o: E = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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