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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.x: C = None
        self.s: C = None
        self.q: A = None
        self.o: B = None
        self.txt = txt

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

a.v = h
a.t = h
i.x = a
i.s = e
i.y = l
i.r = j
i.t = j
i.p = f
c.s = f
b.v = j
b.o = e
e.s = b
h.t = i
h.v = i
h.o = i
h.x = c
h.s = c
h.q = a
l.s = e
f.s = j
j.v = b
j.o = f
m.t = i
m.v = i
m.o = i
m.x = c
m.s = l
m.q = a
assert f.s.o.s.v.o.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.x: C = None
        self.s: C = None
        self.q: A = None
        self.o: B = None
        self.txt = txt

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

a.v = h
a.t = h
i.x = a
i.s = e
i.y = l
i.r = j
i.t = j
i.p = f
c.s = f
b.v = j
b.o = e
e.s = b
h.t = i
h.v = i
h.o = i
h.x = c
h.s = c
h.q = a
l.s = e
f.s = j
j.v = b
j.o = f
m.t = i
m.v = i
m.o = i
m.x = c
m.s = l
m.q = a
assert f.s.o.s.v.o.s.o.txt == "e"