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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.w: H = None
        self.r: C = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.txt = txt

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

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

e.w = h
e.p = c
e.o = n
e.t = d
n.z = c
n.t = h
i.y = d
i.x = n
i.w = g
i.r = a
i.v = k
i.z = j
h.v = d
d.w = j
c.w = n
k.x = c
k.r = n
g.p = n
j.p = n
a.y = d
a.x = n
a.w = g
a.z = g
a.r = i
a.v = k
assert d.w.p.t.v.w.p.t.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.w: H = None
        self.r: C = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.txt = txt

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

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

e.w = h
e.p = c
e.o = n
e.t = d
n.z = c
n.t = h
i.y = d
i.x = n
i.w = g
i.r = a
i.v = k
i.z = j
h.v = d
d.w = j
c.w = n
k.x = c
k.r = n
g.p = n
j.p = n
a.y = d
a.x = n
a.w = g
a.z = g
a.r = i
a.v = k
assert d.w.p.t.v.w.p.t.v.w.txt == "j"