class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: A = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.v: D = None
        self.r: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: A = None
        self.y: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.v: D = None
        self.r: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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