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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: I = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.y: B = None
        self.s: G = None
        self.u: G = None
        self.o: D = None
        self.q: B = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: I = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.y: B = None
        self.s: G = None
        self.u: G = None
        self.o: D = None
        self.q: B = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

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