class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.u: C = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.p: G = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.o: I = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.x: F = None
        self.w: A = None
        self.q: B = None
        self.r: D = None
        self.s: I = None
        self.t: I = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.v: H = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.p: G = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.o: I = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.x: F = None
        self.w: A = None
        self.q: B = None
        self.r: D = None
        self.s: I = None
        self.t: I = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.v: H = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

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

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