class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: D = None
        self.p: F = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.t: B = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.u: B = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.t: B = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.x: D = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.u: B = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

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

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