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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: C = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: F = None
        self.u: F = None
        self.p: I = None
        self.v: G = None
        self.r: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: I = None
        self.o: C = None
        self.r: H = None
        self.s: F = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: C = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: F = None
        self.u: F = None
        self.p: I = None
        self.v: G = None
        self.r: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: I = None
        self.o: C = None
        self.r: H = None
        self.s: F = None
        self.q: I = None
        self.txt = txt

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

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