class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.r: I = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.q: F = None
        self.r: D = None
        self.o: E = None
        self.u: H = None
        self.t: H = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.o: B = None
        self.z: H = None
        self.w: A = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: I = None
        self.p: D = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.r: C = None
        self.u: F = None
        self.z: A = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.o: F = None
        self.r: A = None
        self.t: B = None
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.q: F = None
        self.r: D = None
        self.o: E = None
        self.u: H = None
        self.t: H = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.o: B = None
        self.z: H = None
        self.w: A = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: I = None
        self.p: D = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.r: C = None
        self.u: F = None
        self.z: A = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.o: F = None
        self.r: A = None
        self.t: B = None
        self.s: F = None
        self.txt = txt

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

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