class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.w: F = None
        self.r: E = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.txt = txt

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

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

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