class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.u: H = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.u: I = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: G = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.t: B = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.u: I = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: G = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.t: B = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

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

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