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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: B = None
        self.o: E = None
        self.y: G = None
        self.p: G = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: D = None
        self.z: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: B = None
        self.o: E = None
        self.y: G = None
        self.p: G = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: D = None
        self.z: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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