class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: B = None
        self.x: E = None
        self.w: H = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.y: D = None
        self.o: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = None
        self.o: H = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: C = None
        self.y: D = None
        self.o: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = None
        self.o: H = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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