class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.t: G = None
        self.w: F = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.s: D = None
        self.w: A = None
        self.q: H = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.y: E = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: F = None
        self.o: J = None
        self.p: E = None
        self.y: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.s: D = None
        self.w: A = None
        self.q: H = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.y: E = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: F = None
        self.o: J = None
        self.p: E = None
        self.y: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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