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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.r: J = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.v: J = None
        self.x: B = None
        self.w: D = None
        self.q: G = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.t: J = None
        self.z: A = None
        self.y: J = None
        self.v: B = None
        self.q: D = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: H = None
        self.u: I = None
        self.o: G = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.r: J = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.v: J = None
        self.x: B = None
        self.w: D = None
        self.q: G = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: G = None
        self.t: J = None
        self.z: A = None
        self.y: J = None
        self.v: B = None
        self.q: D = None
        self.u: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: H = None
        self.u: I = None
        self.o: G = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

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

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