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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.q: B = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.q: B = None
        self.o: E = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: E = None
        self.txt = txt

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

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