class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.o: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

e = A("e")
c = B("c")
f = C("f")
i = D("i")
d = E("d")
l = B("l")
g = C("g")
a = A("a")
j = D("j")

e.r = g
e.v = f
e.o = j
e.w = j
c.y = d
c.p = a
c.r = a
f.y = g
i.o = d
i.t = f
i.p = l
i.x = l
d.o = e
d.t = a
d.x = c
l.y = d
l.p = e
l.r = a
g.y = f
a.r = f
a.v = g
a.o = j
a.w = j
j.o = d
j.t = f
j.p = l
j.x = c
assert g.y.y.y.y.y.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.o: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.x: B = None
        self.txt = txt

e = A("e")
c = B("c")
f = C("f")
i = D("i")
d = E("d")
l = B("l")
g = C("g")
a = A("a")
j = D("j")

e.r = g
e.v = f
e.o = j
e.w = j
c.y = d
c.p = a
c.r = a
f.y = g
i.o = d
i.t = f
i.p = l
i.x = l
d.o = e
d.t = a
d.x = c
l.y = d
l.p = e
l.r = a
g.y = f
a.r = f
a.v = g
a.o = j
a.w = j
j.o = d
j.t = f
j.p = l
j.x = c
assert g.y.y.y.y.y.y.y.y.y.txt == "f"