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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.t: D = None
        self.y: B = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

k = A("k")
l = B("l")
d = C("d")
f = D("f")
e = E("e")
m = F("m")
c = G("c")
h = H("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.t: D = None
        self.y: B = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

k = A("k")
l = B("l")
d = C("d")
f = D("f")
e = E("e")
m = F("m")
c = G("c")
h = H("h")

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