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

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

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

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

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

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

i = A("i")
n = B("n")
g = C("g")
c = D("c")
e = E("e")
f = F("f")
m = C("m")
b = A("b")
d = E("d")

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

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

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

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

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

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

i = A("i")
n = B("n")
g = C("g")
c = D("c")
e = E("e")
f = F("f")
m = C("m")
b = A("b")
d = E("d")

i.r = b
i.w = f
i.y = e
i.x = e
n.z = d
n.t = f
g.z = i
g.w = m
g.s = d
c.x = f
c.y = d
e.y = d
e.t = d
e.p = b
e.u = m
e.v = g
f.p = m
f.r = m
f.o = g
f.q = n
f.y = b
f.v = e
m.z = b
m.w = g
m.s = e
b.r = i
b.w = f
b.y = d
b.x = d
d.y = e
d.t = e
d.p = i
d.u = m
d.v = m
assert e.p.r.y.v.z.w.txt == "f"