class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: E = None
        self.o: J = None
        self.r: I = None
        self.p: D = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: D = None
        self.v: J = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: C = None
        self.w: G = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

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

k = A("k")
i = B("i")
m = C("m")
n = D("n")
c = E("c")
j = F("j")
a = G("a")
d = H("d")
b = I("b")
g = J("g")

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: E = None
        self.o: J = None
        self.r: I = None
        self.p: D = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: D = None
        self.v: J = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: C = None
        self.w: G = None
        self.v: B = None
        self.u: A = None
        self.txt = txt

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

k = A("k")
i = B("i")
m = C("m")
n = D("n")
c = E("c")
j = F("j")
a = G("a")
d = H("d")
b = I("b")
g = J("g")

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