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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: I = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.r: A = None
        self.p: E = None
        self.z: C = None
        self.v: B = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.x: J = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.v: D = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: I = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.r: A = None
        self.p: E = None
        self.z: C = None
        self.v: B = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.x: J = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.v: D = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

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

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