class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: I = None
        self.o: D = None
        self.y: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.p: H = None
        self.q: G = None
        self.o: F = None
        self.v: G = None
        self.x: A = None
        self.t: A = None
        self.y: J = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: G = None
        self.p: H = None
        self.q: G = None
        self.o: F = None
        self.v: G = None
        self.x: A = None
        self.t: A = None
        self.y: J = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

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