class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: F = None
        self.o: H = None
        self.z: F = None
        self.s: I = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: D = None
        self.q: A = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.w: H = None
        self.p: H = None
        self.y: E = None
        self.o: H = None
        self.v: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: D = None
        self.q: A = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.w: H = None
        self.p: H = None
        self.y: E = None
        self.o: H = None
        self.v: C = None
        self.z: H = None
        self.txt = txt

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

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