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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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