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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

b.x = i
b.o = f
b.q = f
b.r = f
b.w = g
f.s = l
f.z = h
g.v = i
g.y = d
l.x = j
j.o = l
j.y = l
j.v = l
j.s = e
j.z = d
j.w = g
i.v = l
i.s = g
i.p = e
i.r = f
h.v = i
h.y = d
d.x = i
d.o = e
d.q = e
d.w = g
d.r = f
e.s = l
e.z = h
assert b.x.s.y.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.q: B = None
        self.w: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

b.x = i
b.o = f
b.q = f
b.r = f
b.w = g
f.s = l
f.z = h
g.v = i
g.y = d
l.x = j
j.o = l
j.y = l
j.v = l
j.s = e
j.z = d
j.w = g
i.v = l
i.s = g
i.p = e
i.r = f
h.v = i
h.y = d
d.x = i
d.o = e
d.q = e
d.w = g
d.r = f
e.s = l
e.z = h
assert b.x.s.y.x.v.txt == "l"