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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: E = None
        self.s: D = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.p: D = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

e = A("e")
g = B("g")
b = C("b")
i = D("i")
l = E("l")
d = F("d")
m = E("m")
a = F("a")
h = D("h")
n = C("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: E = None
        self.s: D = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.p: D = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

e = A("e")
g = B("g")
b = C("b")
i = D("i")
l = E("l")
d = F("d")
m = E("m")
a = F("a")
h = D("h")
n = C("n")

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