class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: I = None
        self.t: A = None
        self.q: I = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.z: A = None
        self.p: H = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

d.x = b
d.w = a
d.q = c
n.p = g
n.u = g
n.o = d
n.w = d
n.q = l
n.x = f
n.v = m
n.s = a
a.o = g
a.v = b
a.q = b
a.t = d
a.y = d
f.p = a
f.t = a
f.q = a
f.s = d
f.w = d
f.o = d
f.y = l
f.u = k
f.r = k
f.v = g
c.t = m
c.y = f
c.z = d
c.p = k
c.o = g
c.v = g
m.u = b
m.x = l
g.q = m
k.p = b
k.q = f
k.y = f
k.o = c
k.s = l
k.z = m
k.u = m
b.o = n
b.u = k
b.s = f
b.v = g
l.u = n
l.v = b
l.t = b
l.y = m
l.r = m
l.p = f
l.z = f
l.o = k
l.x = a
l.s = d
assert f.y.x.o.q.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: I = None
        self.t: A = None
        self.q: I = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.z: A = None
        self.p: H = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

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