class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: H = None
        self.z: D = None
        self.o: J = None
        self.u: C = None
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: E = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.w: J = None
        self.y: J = None
        self.t: I = None
        self.o: I = None
        self.s: A = None
        self.r: E = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: J = None
        self.p: D = None
        self.u: G = None
        self.s: B = None
        self.v: J = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: I = None
        self.x: E = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: H = None
        self.z: D = None
        self.o: J = None
        self.u: C = None
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: E = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.w: J = None
        self.y: J = None
        self.t: I = None
        self.o: I = None
        self.s: A = None
        self.r: E = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: J = None
        self.p: D = None
        self.u: G = None
        self.s: B = None
        self.v: J = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: I = None
        self.x: E = None
        self.s: A = None
        self.txt = txt

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

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