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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: F = None
        self.u: I = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.r: I = None
        self.z: B = None
        self.u: D = None
        self.o: C = None
        self.x: C = None
        self.v: B = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: I = None
        self.o: D = None
        self.t: F = None
        self.p: A = None
        self.z: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: F = None
        self.u: I = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.r: I = None
        self.z: B = None
        self.u: D = None
        self.o: C = None
        self.x: C = None
        self.v: B = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: I = None
        self.o: D = None
        self.t: F = None
        self.p: A = None
        self.z: F = None
        self.q: A = None
        self.txt = txt

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

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