class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.u: H = None
        self.p: G = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.z: B = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: B = None
        self.u: H = None
        self.p: G = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.z: B = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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