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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: G = None
        self.x: E = None
        self.s: A = None
        self.o: C = None
        self.u: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.v: C = None
        self.q: E = None
        self.y: I = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.s: E = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: G = None
        self.x: E = None
        self.s: A = None
        self.o: C = None
        self.u: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.v: C = None
        self.q: E = None
        self.y: I = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.s: E = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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