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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.p: H = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.p: H = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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