class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: D = None
        self.p: A = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.w: E = None
        self.v: D = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

l = A("l")
b = B("b")
n = C("n")
a = D("a")
c = E("c")
d = F("d")
k = B("k")
i = E("i")
f = D("f")
h = D("h")

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: D = None
        self.p: A = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.w: E = None
        self.v: D = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

l = A("l")
b = B("b")
n = C("n")
a = D("a")
c = E("c")
d = F("d")
k = B("k")
i = E("i")
f = D("f")
h = D("h")

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