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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

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