class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: B = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: J = None
        self.w: I = None
        self.q: F = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: I = None
        self.t: G = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: G = None
        self.v: E = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: B = None
        self.y: E = None
        self.q: E = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.o: J = None
        self.y: A = None
        self.z: E = None
        self.t: J = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.s: A = None
        self.z: C = None
        self.v: E = None
        self.txt = txt

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

a.r = k
a.z = c
a.y = l
c.z = a
c.u = e
c.w = m
c.v = m
c.q = k
h.y = n
h.t = n
h.x = m
h.z = e
b.u = d
b.v = d
b.r = d
b.x = n
b.w = n
d.q = a
d.w = n
k.o = n
n.y = k
n.v = e
l.r = m
l.z = c
l.t = c
l.y = d
l.q = d
m.r = c
m.w = a
m.y = a
m.o = e
m.t = e
m.z = d
m.u = k
e.q = h
e.z = h
e.p = n
e.s = a
e.v = d
assert n.y.o.y.o.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: B = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: J = None
        self.w: I = None
        self.q: F = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: I = None
        self.t: G = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: G = None
        self.v: E = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: B = None
        self.y: E = None
        self.q: E = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.o: J = None
        self.y: A = None
        self.z: E = None
        self.t: J = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.s: A = None
        self.z: C = None
        self.v: E = None
        self.txt = txt

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

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