class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: C = None
        self.s: E = None
        self.w: D = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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