class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.q: A = None
        self.r: I = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.q: A = None
        self.r: I = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: B = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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