class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: G = None
        self.o: C = None
        self.u: E = None
        self.r: H = None
        self.q: C = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: F = None
        self.q: B = None
        self.t: C = None
        self.o: B = None
        self.txt = txt

f = A("f")
c = B("c")
e = C("e")
k = D("k")
i = E("i")
a = F("a")
m = G("m")
l = H("l")
g = F("g")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: F = None
        self.q: B = None
        self.t: C = None
        self.o: B = None
        self.txt = txt

f = A("f")
c = B("c")
e = C("e")
k = D("k")
i = E("i")
a = F("a")
m = G("m")
l = H("l")
g = F("g")

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