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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: A = None
        self.r: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

f = A("f")
e = B("e")
c = C("c")
h = D("h")
i = E("i")
k = F("k")
g = E("g")

f.x = k
f.w = k
f.r = k
f.y = g
f.o = g
e.w = h
e.v = h
e.p = f
e.r = f
c.r = k
c.p = h
c.y = e
c.t = g
h.p = k
h.v = i
h.q = c
i.s = c
i.y = g
i.u = f
k.z = h
k.y = h
k.x = f
k.t = c
k.r = e
g.s = c
g.y = i
g.u = f
assert e.v.v.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.w: F = None
        self.o: E = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: A = None
        self.r: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

f = A("f")
e = B("e")
c = C("c")
h = D("h")
i = E("i")
k = F("k")
g = E("g")

f.x = k
f.w = k
f.r = k
f.y = g
f.o = g
e.w = h
e.v = h
e.p = f
e.r = f
c.r = k
c.p = h
c.y = e
c.t = g
h.p = k
h.v = i
h.q = c
i.s = c
i.y = g
i.u = f
k.z = h
k.y = h
k.x = f
k.t = c
k.r = e
g.s = c
g.y = i
g.u = f
assert e.v.v.s.y.txt == "e"