class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.s: B = None
        self.p: D = None
        self.r: D = None
        self.v: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: I = None
        self.t: B = None
        self.o: I = None
        self.x: G = None
        self.u: G = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.u: C = None
        self.x: B = None
        self.q: F = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.y: E = None
        self.z: E = None
        self.v: E = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: I = None
        self.t: B = None
        self.o: I = None
        self.x: G = None
        self.u: G = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: H = None
        self.u: C = None
        self.x: B = None
        self.q: F = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.y: E = None
        self.z: E = None
        self.v: E = None
        self.s: H = None
        self.txt = txt

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

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