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

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

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

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

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

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

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

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

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

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

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

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

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

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

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