class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.u: C = None
        self.w: C = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

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

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

h.z = b
h.v = c
b.w = a
b.p = e
b.v = e
b.r = e
e.z = a
e.q = f
e.r = c
e.x = g
d.p = a
d.y = m
d.u = e
d.w = e
d.r = f
d.x = b
f.r = m
f.p = m
f.v = c
f.o = e
m.v = d
m.y = d
m.q = e
m.u = g
g.r = a
g.p = a
g.v = c
g.o = e
c.w = a
c.p = e
c.v = e
c.r = e
a.v = d
a.y = d
a.q = e
a.u = f
assert e.r.v.r.w.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.u: C = None
        self.w: C = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

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

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

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

h.z = b
h.v = c
b.w = a
b.p = e
b.v = e
b.r = e
e.z = a
e.q = f
e.r = c
e.x = g
d.p = a
d.y = m
d.u = e
d.w = e
d.r = f
d.x = b
f.r = m
f.p = m
f.v = c
f.o = e
m.v = d
m.y = d
m.q = e
m.u = g
g.r = a
g.p = a
g.v = c
g.o = e
c.w = a
c.p = e
c.v = e
c.r = e
a.v = d
a.y = d
a.q = e
a.u = f
assert e.r.v.r.w.v.p.txt == "a"