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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.u: C = None
        self.r: D = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.u: C = None
        self.r: D = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

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