class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.w: G = None
        self.q: D = None
        self.z: G = None
        self.v: B = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: G = None
        self.z: B = None
        self.t: A = None
        self.q: C = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.w: H = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.w: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: G = None
        self.z: B = None
        self.t: A = None
        self.q: C = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.w: H = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

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

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

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