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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.w: E = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

e = A("e")
d = B("d")
b = C("b")
k = D("k")
c = E("c")
i = F("i")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.w: E = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

e = A("e")
d = B("d")
b = C("b")
k = D("k")
c = E("c")
i = F("i")

e.w = i
e.x = i
e.v = c
d.q = k
d.x = k
b.r = d
b.y = k
b.o = c
b.t = c
b.z = i
b.x = e
k.w = c
c.v = i
c.t = b
i.t = d
i.y = d
i.w = c
i.u = c
i.v = e
assert d.q.w.t.t.t.txt == "b"