class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: H = None
        self.t: D = None
        self.y: F = None
        self.o: I = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

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