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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.p: J = None
        self.u: G = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: J = None
        self.s: G = None
        self.t: H = None
        self.r: E = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: I = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.p: J = None
        self.u: G = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: J = None
        self.s: G = None
        self.t: H = None
        self.r: E = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: I = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

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

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