class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.z: G = None
        self.o: J = None
        self.q: C = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: J = None
        self.y: B = None
        self.q: F = None
        self.w: J = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.o: D = None
        self.s: C = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: J = None
        self.y: B = None
        self.q: F = None
        self.w: J = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.o: D = None
        self.s: C = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

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

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