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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.y: F = None
        self.p: H = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: G = None
        self.o: F = None
        self.p: B = None
        self.q: C = None
        self.r: G = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.r: F = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

e = A("e")
g = B("g")
m = C("m")
k = D("k")
l = E("l")
h = F("h")
b = G("b")
c = H("c")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: D = None
        self.y: F = None
        self.p: H = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: G = None
        self.o: F = None
        self.p: B = None
        self.q: C = None
        self.r: G = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.r: F = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

e = A("e")
g = B("g")
m = C("m")
k = D("k")
l = E("l")
h = F("h")
b = G("b")
c = H("c")
d = C("d")

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