class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: G = None
        self.o: F = None
        self.t: H = None
        self.s: H = None
        self.p: G = None
        self.v: H = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.o: D = None
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

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

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

d = A("d")
k = B("k")
a = C("a")
m = D("m")
i = E("i")
e = F("e")
g = G("g")
b = H("b")

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.o: D = None
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

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

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

d = A("d")
k = B("k")
a = C("a")
m = D("m")
i = E("i")
e = F("e")
g = G("g")
b = H("b")

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