class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: C = None
        self.s: C = None
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.p: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: A = None
        self.p: A = None
        self.y: D = None
        self.txt = txt

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

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