class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: J = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.p: C = None
        self.y: D = None
        self.s: F = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: F = None
        self.y: B = None
        self.u: J = None
        self.w: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.t: B = None
        self.z: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.p: F = None
        self.x: A = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.p: C = None
        self.y: D = None
        self.s: F = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: F = None
        self.y: B = None
        self.u: J = None
        self.w: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.t: B = None
        self.z: G = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.p: F = None
        self.x: A = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

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

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

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