class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.w: D = None
        self.p: I = None
        self.t: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.r: G = None
        self.y: D = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: A = None
        self.s: A = None
        self.z: I = None
        self.q: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: J = None
        self.x: B = None
        self.q: I = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.r: G = None
        self.y: D = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: A = None
        self.s: A = None
        self.z: I = None
        self.q: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: J = None
        self.x: B = None
        self.q: I = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.txt = txt

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

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

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