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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: I = None
        self.r: H = None
        self.q: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: G = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: J = None
        self.u: I = None
        self.o: D = None
        self.x: C = None
        self.s: I = None
        self.y: G = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: I = None
        self.r: H = None
        self.q: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: G = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: J = None
        self.u: I = None
        self.o: D = None
        self.x: C = None
        self.s: I = None
        self.y: G = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

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