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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: A = None
        self.z: C = None
        self.u: C = None
        self.y: H = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.r: C = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: A = None
        self.z: C = None
        self.u: C = None
        self.y: H = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.r: C = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: H = None
        self.txt = txt

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

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