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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: E = None
        self.y: C = None
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.q: H = None
        self.v: I = None
        self.x: H = None
        self.txt = txt

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

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

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

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

i = A("i")
c = B("c")
f = C("f")
a = D("a")
h = E("h")
e = F("e")
n = G("n")
d = H("d")
b = I("b")
j = J("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: E = None
        self.y: C = None
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.q: H = None
        self.v: I = None
        self.x: H = None
        self.txt = txt

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

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

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

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

i = A("i")
c = B("c")
f = C("f")
a = D("a")
h = E("h")
e = F("e")
n = G("n")
d = H("d")
b = I("b")
j = J("j")

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