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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: I = None
        self.t: G = None
        self.x: F = None
        self.y: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.p: A = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: I = None
        self.t: G = None
        self.x: F = None
        self.y: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.p: A = None
        self.s: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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