class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.z: C = None
        self.x: B = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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