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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: A = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: A = None
        self.p: F = None
        self.q: C = None
        self.txt = txt

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

a.y = e
a.o = e
a.x = m
a.p = m
l.r = c
l.v = f
l.p = f
f.w = l
f.u = a
f.z = a
f.o = e
e.q = c
e.w = a
e.p = n
n.s = a
n.o = a
n.y = m
n.p = e
n.x = c
j.w = m
j.p = m
j.r = a
j.q = f
c.s = a
c.o = a
c.y = m
c.p = e
c.x = n
m.w = j
m.p = j
m.r = a
m.q = f
i.r = n
i.v = f
i.p = f
assert f.o.p.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: D = None
        self.x: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: A = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: A = None
        self.p: F = None
        self.q: C = None
        self.txt = txt

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

a.y = e
a.o = e
a.x = m
a.p = m
l.r = c
l.v = f
l.p = f
f.w = l
f.u = a
f.z = a
f.o = e
e.q = c
e.w = a
e.p = n
n.s = a
n.o = a
n.y = m
n.p = e
n.x = c
j.w = m
j.p = m
j.r = a
j.q = f
c.s = a
c.o = a
c.y = m
c.p = e
c.x = n
m.w = j
m.p = j
m.r = a
m.q = f
i.r = n
i.v = f
i.p = f
assert f.o.p.y.p.txt == "j"