class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: E = None
        self.w: F = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.r: E = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.r: E = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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