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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.t: D = None
        self.z: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.o: C = None
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.t: D = None
        self.z: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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