class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.z: B = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: H = None
        self.y: G = None
        self.t: H = None
        self.u: A = None
        self.s: G = None
        self.r: G = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.x: F = None
        self.o: G = None
        self.w: C = None
        self.v: F = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: H = None
        self.y: G = None
        self.t: H = None
        self.u: A = None
        self.s: G = None
        self.r: G = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.x: F = None
        self.o: G = None
        self.w: C = None
        self.v: F = None
        self.s: B = None
        self.txt = txt

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

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