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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: A = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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