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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: B = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: D = None
        self.q: J = None
        self.z: F = None
        self.v: H = None
        self.p: F = None
        self.w: D = None
        self.t: B = None
        self.s: J = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

i = A("i")
g = B("g")
h = C("h")
j = D("j")
c = E("c")
f = F("f")
k = G("k")
a = H("a")
m = I("m")
e = J("e")

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: B = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: D = None
        self.q: J = None
        self.z: F = None
        self.v: H = None
        self.p: F = None
        self.w: D = None
        self.t: B = None
        self.s: J = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

i = A("i")
g = B("g")
h = C("h")
j = D("j")
c = E("c")
f = F("f")
k = G("k")
a = H("a")
m = I("m")
e = J("e")

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