class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.w: E = None
        self.x: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: I = None
        self.y: D = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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