class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: D = None
        self.y: D = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

n.u = j
n.s = l
n.y = d
n.p = k
g.q = j
g.p = j
g.s = a
g.r = c
g.z = d
f.s = g
f.w = l
f.x = l
l.o = f
l.x = d
l.t = g
i.u = f
i.w = f
i.y = k
i.z = d
c.z = l
c.y = l
c.r = g
c.p = a
c.t = n
k.z = d
k.r = j
k.y = l
k.p = a
k.t = n
d.o = f
d.x = l
d.t = g
j.q = g
j.p = g
j.s = i
j.r = c
j.z = d
a.u = f
a.w = f
a.y = k
a.z = l
assert d.t.s.z.x.o.x.x.txt == "d"