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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: F = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

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

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

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

i = A("i")
e = B("e")
c = C("c")
g = D("g")
n = E("n")
l = F("l")
h = F("h")
f = C("f")

i.v = f
i.o = h
e.t = g
e.y = g
e.v = i
e.o = i
c.o = h
c.w = h
c.p = i
c.z = n
g.q = i
g.y = e
n.s = g
n.u = g
n.q = h
n.o = h
n.v = e
n.z = f
l.p = n
l.x = e
h.p = n
h.x = e
f.o = l
f.w = h
f.p = i
f.z = n
assert f.z.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: F = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

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

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

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

i = A("i")
e = B("e")
c = C("c")
g = D("g")
n = E("n")
l = F("l")
h = F("h")
f = C("f")

i.v = f
i.o = h
e.t = g
e.y = g
e.v = i
e.o = i
c.o = h
c.w = h
c.p = i
c.z = n
g.q = i
g.y = e
n.s = g
n.u = g
n.q = h
n.o = h
n.v = e
n.z = f
l.p = n
l.x = e
h.p = n
h.x = e
f.o = l
f.w = h
f.p = i
f.z = n
assert f.z.q.p.txt == "n"