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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

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

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