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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.u: A = None
        self.x: H = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.q: D = None
        self.t: H = None
        self.u: F = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.x: F = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

i = A("i")
b = B("b")
f = C("f")
h = D("h")
a = E("a")
l = F("l")
m = G("m")
e = H("e")
g = E("g")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.u: A = None
        self.x: H = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.q: D = None
        self.t: H = None
        self.u: F = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.x: F = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

i = A("i")
b = B("b")
f = C("f")
h = D("h")
a = E("a")
l = F("l")
m = G("m")
e = H("e")
g = E("g")

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