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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

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

d.o = m
h.o = i
h.v = i
h.r = i
h.w = i
h.x = l
h.u = j
i.v = a
i.z = h
i.u = d
j.v = i
j.w = b
j.u = m
j.x = l
n.z = f
n.o = f
n.q = h
n.x = i
l.u = d
l.r = d
l.t = j
l.p = m
b.u = d
b.r = d
b.t = j
b.p = j
f.o = i
f.v = i
f.r = i
f.w = i
f.x = b
f.u = j
a.z = h
a.o = h
a.q = h
a.x = i
m.v = i
m.w = l
m.x = l
m.u = j
assert d.o.v.u.o.v.z.u.u.txt == "m"