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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: J = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.y: A = None
        self.t: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: D = None
        self.t: H = None
        self.u: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: J = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: D = None
        self.y: A = None
        self.t: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: D = None
        self.t: H = None
        self.u: J = None
        self.txt = txt

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

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

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

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

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