class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: F = None
        self.s: D = None
        self.r: E = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.v: H = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

d = A("d")
h = B("h")
k = C("k")
n = D("n")
i = E("i")
b = F("b")
c = G("c")
g = H("g")
j = F("j")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.v: H = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

d = A("d")
h = B("h")
k = C("k")
n = D("n")
i = E("i")
b = F("b")
c = G("c")
g = H("g")
j = F("j")

d.w = b
d.v = j
d.s = n
d.z = n
d.r = i
d.u = c
h.w = j
h.o = j
h.v = g
h.s = i
h.q = i
k.t = h
k.y = b
k.v = g
n.o = c
n.u = c
n.w = g
n.t = g
n.p = i
n.q = b
n.s = b
i.y = h
b.p = g
c.y = n
g.u = k
g.t = k
g.r = i
g.v = n
g.s = c
j.p = g
assert j.p.t.y.p.u.t.v.r.txt == "i"