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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.x: C = None
        self.v: F = None
        self.q: B = None
        self.p: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: I = None
        self.o: C = None
        self.v: H = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.y: E = None
        self.x: C = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.x: C = None
        self.v: F = None
        self.q: B = None
        self.p: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: I = None
        self.o: C = None
        self.v: H = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.y: E = None
        self.x: C = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

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

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

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