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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.q: J = None
        self.r: I = None
        self.w: B = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: E = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: B = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.q: J = None
        self.r: I = None
        self.w: B = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: E = None
        self.r: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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