class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.r: C = None
        self.u: F = None
        self.x: F = None
        self.q: H = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.y: A = None
        self.s: A = None
        self.z: C = None
        self.o: E = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.p: H = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.s: E = None
        self.p: A = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: H = None
        self.v: A = None
        self.o: E = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.s: F = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.r: C = None
        self.u: F = None
        self.x: F = None
        self.q: H = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.y: A = None
        self.s: A = None
        self.z: C = None
        self.o: E = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.p: H = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.s: E = None
        self.p: A = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: H = None
        self.v: A = None
        self.o: E = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.s: F = None
        self.x: E = None
        self.txt = txt

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

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