class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.t: D = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.t: G = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.z: H = None
        self.u: G = None
        self.p: H = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.y: D = None
        self.p: A = None
        self.w: D = None
        self.q: C = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.u: B = None
        self.v: D = None
        self.p: C = None
        self.x: C = None
        self.txt = txt

d = A("d")
f = B("f")
h = C("h")
c = D("c")
j = E("j")
m = F("m")
i = G("i")
l = H("l")
g = A("g")
n = H("n")

d.z = j
d.r = i
f.y = j
f.r = j
f.w = j
f.t = c
f.v = i
h.z = f
h.w = f
h.r = f
h.u = m
h.t = i
c.o = j
c.r = h
c.u = m
c.t = m
c.v = g
c.s = i
c.w = n
c.q = d
j.z = d
m.v = j
m.r = d
m.y = d
m.z = n
m.p = n
m.u = i
m.q = i
i.z = f
i.x = c
i.y = c
i.w = c
i.p = g
i.q = h
i.o = h
i.v = m
l.s = c
l.v = c
l.q = d
l.u = f
l.p = h
l.x = h
g.z = j
g.r = i
n.s = c
n.v = c
n.q = g
n.u = f
n.p = h
n.x = h
assert d.r.p.r.z.v.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.t: D = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.t: G = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.z: H = None
        self.u: G = None
        self.p: H = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.y: D = None
        self.p: A = None
        self.w: D = None
        self.q: C = None
        self.v: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.u: B = None
        self.v: D = None
        self.p: C = None
        self.x: C = None
        self.txt = txt

d = A("d")
f = B("f")
h = C("h")
c = D("c")
j = E("j")
m = F("m")
i = G("i")
l = H("l")
g = A("g")
n = H("n")

d.z = j
d.r = i
f.y = j
f.r = j
f.w = j
f.t = c
f.v = i
h.z = f
h.w = f
h.r = f
h.u = m
h.t = i
c.o = j
c.r = h
c.u = m
c.t = m
c.v = g
c.s = i
c.w = n
c.q = d
j.z = d
m.v = j
m.r = d
m.y = d
m.z = n
m.p = n
m.u = i
m.q = i
i.z = f
i.x = c
i.y = c
i.w = c
i.p = g
i.q = h
i.o = h
i.v = m
l.s = c
l.v = c
l.q = d
l.u = f
l.p = h
l.x = h
g.z = j
g.r = i
n.s = c
n.v = c
n.q = g
n.u = f
n.p = h
n.x = h
assert d.r.p.r.z.v.v.v.txt == "j"