class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: J = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: E = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: E = None
        self.s: E = None
        self.t: I = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: E = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: E = None
        self.s: E = None
        self.t: I = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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