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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.s: C = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.s: C = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

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

f.v = i
f.o = n
n.w = f
n.z = i
n.s = h
n.q = h
n.y = l
h.w = i
h.t = b
i.z = h
i.s = h
i.v = j
i.y = b
i.x = b
b.x = h
b.s = f
j.p = h
j.y = h
j.t = b
l.w = f
l.z = m
l.s = h
l.q = h
l.y = n
m.z = h
m.s = h
m.v = j
m.y = b
m.x = b
assert f.v.v.t.s.o.w.o.y.txt == "l"