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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.r: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.r: C = None
        self.w: B = None
        self.txt = txt

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

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

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

c.x = m
c.v = f
c.z = e
c.u = i
i.v = g
i.z = g
i.r = c
i.s = e
i.u = l
i.w = l
e.v = m
e.u = l
e.r = i
g.t = m
g.y = c
g.r = e
g.w = i
l.y = e
l.w = c
m.v = e
m.t = e
m.z = g
m.p = l
f.v = g
f.z = g
f.r = c
f.s = e
f.u = l
f.w = l
assert e.u.w.x.p.txt == "l"