class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.w: E = None
        self.u: E = None
        self.p: H = None
        self.r: C = None
        self.o: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: G = None
        self.u: D = None
        self.x: F = None
        self.w: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.x: D = None
        self.r: F = None
        self.q: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: B = None
        self.o: J = None
        self.y: G = None
        self.x: J = None
        self.s: C = None
        self.r: C = None
        self.p: H = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: G = None
        self.u: D = None
        self.x: F = None
        self.w: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.x: D = None
        self.r: F = None
        self.q: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: B = None
        self.o: J = None
        self.y: G = None
        self.x: J = None
        self.s: C = None
        self.r: C = None
        self.p: H = None
        self.w: G = None
        self.txt = txt

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

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

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