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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: B = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: B = None
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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