class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: B = None
        self.z: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: C = None
        self.r: D = None
        self.s: A = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: C = None
        self.r: D = None
        self.s: A = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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