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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: J = None
        self.u: G = None
        self.t: D = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: E = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.v: G = None
        self.o: J = None
        self.u: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.q: F = None
        self.p: A = None
        self.w: F = None
        self.o: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.v: I = None
        self.q: C = None
        self.u: J = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: J = None
        self.u: G = None
        self.t: D = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: E = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.v: G = None
        self.o: J = None
        self.u: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.q: F = None
        self.p: A = None
        self.w: F = None
        self.o: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.v: I = None
        self.q: C = None
        self.u: J = None
        self.x: D = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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