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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: J = None
        self.u: A = None
        self.x: B = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.z: B = None
        self.v: J = None
        self.y: D = None
        self.q: J = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: J = None
        self.t: H = None
        self.o: A = None
        self.s: J = None
        self.w: F = None
        self.v: I = None
        self.p: D = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.u: D = None
        self.w: J = None
        self.s: B = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: J = None
        self.u: A = None
        self.x: B = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.z: B = None
        self.v: J = None
        self.y: D = None
        self.q: J = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: J = None
        self.t: H = None
        self.o: A = None
        self.s: J = None
        self.w: F = None
        self.v: I = None
        self.p: D = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.u: D = None
        self.w: J = None
        self.s: B = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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