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

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

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

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

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

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

c = A("c")
i = B("i")
m = C("m")
l = D("l")
j = E("j")
e = F("e")
k = F("k")

c.y = i
i.y = c
m.w = i
m.x = j
m.s = j
m.v = l
l.p = k
l.t = m
l.z = j
l.s = i
l.x = c
l.o = e
j.s = l
j.z = e
e.w = m
e.s = m
e.x = l
e.z = l
k.w = m
k.s = m
k.x = l
k.z = l
assert e.w.v.t.w.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

c = A("c")
i = B("i")
m = C("m")
l = D("l")
j = E("j")
e = F("e")
k = F("k")

c.y = i
i.y = c
m.w = i
m.x = j
m.s = j
m.v = l
l.p = k
l.t = m
l.z = j
l.s = i
l.x = c
l.o = e
j.s = l
j.z = e
e.w = m
e.s = m
e.x = l
e.z = l
k.w = m
k.s = m
k.x = l
k.z = l
assert e.w.v.t.w.y.y.y.txt == "c"