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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: H = None
        self.x: G = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.p: H = None
        self.o: G = None
        self.v: I = None
        self.z: B = None
        self.r: E = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.z: F = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.w: H = None
        self.r: C = None
        self.q: E = None
        self.y: E = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: H = None
        self.x: G = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.p: H = None
        self.o: G = None
        self.v: I = None
        self.z: B = None
        self.r: E = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.z: F = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.w: H = None
        self.r: C = None
        self.q: E = None
        self.y: E = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

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

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