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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.t: J = None
        self.s: B = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: B = None
        self.o: G = None
        self.t: A = None
        self.w: A = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: B = None
        self.v: E = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: J = None
        self.y: J = None
        self.u: E = None
        self.w: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: I = None
        self.t: J = None
        self.s: B = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: B = None
        self.o: G = None
        self.t: A = None
        self.w: A = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: B = None
        self.v: E = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: J = None
        self.y: J = None
        self.u: E = None
        self.w: J = None
        self.txt = txt

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

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

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