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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.r: B = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: E = None
        self.y: E = None
        self.q: J = None
        self.r: F = None
        self.p: F = None
        self.t: F = None
        self.z: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.y: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.r: B = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: E = None
        self.y: E = None
        self.q: J = None
        self.r: F = None
        self.p: F = None
        self.t: F = None
        self.z: J = None
        self.txt = txt

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

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

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

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