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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.o: F = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.q: A = None
        self.z: C = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.o: F = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.q: A = None
        self.z: C = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

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

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

i.p = f
b.r = d
b.q = i
b.z = i
b.p = i
e.y = g
e.p = g
e.t = a
e.o = d
e.w = f
a.z = c
a.w = d
a.r = b
f.s = c
f.u = c
f.p = d
f.q = i
f.z = k
f.x = e
d.u = a
d.s = a
d.y = g
d.o = g
d.t = f
d.p = i
g.z = c
g.r = c
g.w = d
l.y = a
l.t = g
l.p = g
l.o = d
l.w = f
k.y = a
k.t = g
k.p = g
k.o = d
k.w = f
c.r = d
c.q = i
c.z = i
c.p = i
assert a.w.s.r.r.p.p.txt == "f"