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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.r: E = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: B = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.r: E = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: B = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

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