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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: H = None
        self.r: E = None
        self.w: G = None
        self.u: D = None
        self.o: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

f = A("f")
c = B("c")
h = C("h")
d = D("d")
l = E("l")
a = F("a")
e = G("e")
n = H("n")
b = B("b")

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: H = None
        self.r: E = None
        self.w: G = None
        self.u: D = None
        self.o: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

f = A("f")
c = B("c")
h = C("h")
d = D("d")
l = E("l")
a = F("a")
e = G("e")
n = H("n")
b = B("b")

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