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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.u: I = None
        self.r: B = None
        self.v: E = None
        self.o: B = None
        self.p: I = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.v: D = None
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.u: I = None
        self.r: B = None
        self.v: E = None
        self.o: B = None
        self.p: I = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.v: D = None
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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