class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.q: I = None
        self.u: J = None
        self.z: J = None
        self.v: H = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.q: I = None
        self.u: J = None
        self.z: J = None
        self.v: H = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.z: C = None
        self.s: G = None
        self.txt = txt

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

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

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