class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: D = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.v: E = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: D = None
        self.w: G = None
        self.x: D = None
        self.s: I = None
        self.v: E = None
        self.u: D = None
        self.t: C = None
        self.q: J = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.u: I = None
        self.r: B = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.v: E = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: D = None
        self.w: G = None
        self.x: D = None
        self.s: I = None
        self.v: E = None
        self.u: D = None
        self.t: C = None
        self.q: J = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.u: I = None
        self.r: B = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

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