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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.u: C = None
        self.r: C = None
        self.o: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.u: C = None
        self.r: C = None
        self.o: B = None
        self.y: C = None
        self.txt = txt

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

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

n.x = b
n.t = b
n.v = l
n.p = e
n.y = e
g.v = l
g.u = l
g.x = l
g.q = e
g.p = b
g.y = n
e.s = b
e.q = n
e.p = l
b.u = l
b.y = n
b.r = f
f.t = n
f.q = n
f.u = e
f.r = e
f.y = e
f.o = g
l.w = e
l.r = n
assert n.p.s.y.v.w.txt == "e"