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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.z: E = None
        self.x: F = None
        self.t: E = None
        self.o: F = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.z: E = None
        self.x: F = None
        self.t: E = None
        self.o: F = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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