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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: C = None
        self.p: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: I = None
        self.o: E = None
        self.z: E = None
        self.w: E = None
        self.p: G = None
        self.q: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.o: D = None
        self.x: F = None
        self.t: F = None
        self.u: H = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.v: G = None
        self.z: B = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: C = None
        self.p: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: I = None
        self.o: E = None
        self.z: E = None
        self.w: E = None
        self.p: G = None
        self.q: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.o: D = None
        self.x: F = None
        self.t: F = None
        self.u: H = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.v: G = None
        self.z: B = None
        self.o: A = None
        self.txt = txt

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

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