class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.z: E = None
        self.y: H = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.t: I = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.z: F = None
        self.u: I = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: A = None
        self.q: H = None
        self.p: D = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.w: H = None
        self.p: H = None
        self.q: E = None
        self.u: C = None
        self.r: D = None
        self.z: G = None
        self.x: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: H = None
        self.o: B = None
        self.z: H = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.t: I = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.z: F = None
        self.u: I = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: A = None
        self.q: H = None
        self.p: D = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.w: H = None
        self.p: H = None
        self.q: E = None
        self.u: C = None
        self.r: D = None
        self.z: G = None
        self.x: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: H = None
        self.o: B = None
        self.z: H = None
        self.s: F = None
        self.txt = txt

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

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