class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: J = None
        self.o: G = None
        self.y: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.z: J = None
        self.w: J = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.z: G = None
        self.v: A = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: B = None
        self.o: E = None
        self.v: D = None
        self.y: C = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: C = None
        self.o: B = None
        self.t: F = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: F = None
        self.s: F = None
        self.x: J = None
        self.q: E = None
        self.v: J = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: I = None
        self.s: F = None
        self.o: D = None
        self.w: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.z: J = None
        self.w: J = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.z: G = None
        self.v: A = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: B = None
        self.o: E = None
        self.v: D = None
        self.y: C = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: C = None
        self.o: B = None
        self.t: F = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: F = None
        self.s: F = None
        self.x: J = None
        self.q: E = None
        self.v: J = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: I = None
        self.s: F = None
        self.o: D = None
        self.w: I = None
        self.txt = txt

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

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