class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.v: A = None
        self.t: H = None
        self.o: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: E = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.v: A = None
        self.t: H = None
        self.o: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: E = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

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

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

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