class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.o: C = None
        self.z: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.w: J = None
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: G = None
        self.w: A = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.w: J = None
        self.r: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: G = None
        self.w: A = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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