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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: C = None
        self.y: A = None
        self.q: F = None
        self.u: J = None
        self.r: G = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: G = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: C = None
        self.y: A = None
        self.q: F = None
        self.u: J = None
        self.r: G = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: G = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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