class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.s: D = None
        self.w: J = None
        self.o: D = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.r: I = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.v: A = None
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: E = None
        self.t: B = None
        self.u: A = None
        self.s: C = None
        self.r: C = None
        self.y: F = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.r: I = None
        self.v: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.v: A = None
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: E = None
        self.t: B = None
        self.u: A = None
        self.s: C = None
        self.r: C = None
        self.y: F = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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