class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: D = None
        self.r: B = None
        self.q: A = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.t: F = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

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

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

h = A("h")
e = B("e")
l = C("l")
g = D("g")
a = E("a")
m = F("m")
k = F("k")
n = C("n")
d = B("d")
i = A("i")

h.p = m
h.z = g
h.r = e
h.q = i
h.s = i
h.v = i
e.r = m
e.u = g
l.x = n
l.p = n
l.z = n
l.t = k
l.o = i
g.s = h
g.r = i
g.t = i
g.u = i
g.v = e
g.z = l
a.z = h
a.v = d
a.y = k
m.v = h
m.z = n
k.v = i
k.z = n
n.x = l
n.p = l
n.z = l
n.t = k
n.o = i
d.r = k
d.u = g
i.p = m
i.z = g
i.r = d
i.q = h
i.s = h
i.v = h
assert a.y.v.z.t.q.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: D = None
        self.r: B = None
        self.q: A = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.t: F = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

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

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

h = A("h")
e = B("e")
l = C("l")
g = D("g")
a = E("a")
m = F("m")
k = F("k")
n = C("n")
d = B("d")
i = A("i")

h.p = m
h.z = g
h.r = e
h.q = i
h.s = i
h.v = i
e.r = m
e.u = g
l.x = n
l.p = n
l.z = n
l.t = k
l.o = i
g.s = h
g.r = i
g.t = i
g.u = i
g.v = e
g.z = l
a.z = h
a.v = d
a.y = k
m.v = h
m.z = n
k.v = i
k.z = n
n.x = l
n.p = l
n.z = l
n.t = k
n.o = i
d.r = k
d.u = g
i.p = m
i.z = g
i.r = d
i.q = h
i.s = h
i.v = h
assert a.y.v.z.t.q.z.z.txt == "l"