class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.x: F = None
        self.t: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: J = None
        self.p: H = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: J = None
        self.p: H = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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