class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.t: H = None
        self.r: E = None
        self.txt = txt

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

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

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

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

a = A("a")
l = B("l")
b = C("b")
j = D("j")
e = E("e")
i = F("i")
g = G("g")
f = H("f")
k = H("k")
d = C("d")

a.p = j
l.w = e
l.z = j
l.y = k
l.v = d
b.v = g
b.t = l
b.x = d
j.x = a
j.o = l
j.t = f
j.r = e
e.q = j
e.y = f
e.w = a
e.t = a
e.u = l
e.r = b
e.v = b
e.o = i
i.s = j
i.x = e
i.t = k
i.o = a
i.v = a
i.u = l
g.u = a
g.r = j
f.v = l
f.o = j
f.t = j
f.p = a
f.x = d
k.v = l
k.o = j
k.t = j
k.p = a
k.x = b
d.v = g
d.t = l
d.x = b
assert k.v.z.o.z.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.t: H = None
        self.r: E = None
        self.txt = txt

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

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

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

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

a = A("a")
l = B("l")
b = C("b")
j = D("j")
e = E("e")
i = F("i")
g = G("g")
f = H("f")
k = H("k")
d = C("d")

a.p = j
l.w = e
l.z = j
l.y = k
l.v = d
b.v = g
b.t = l
b.x = d
j.x = a
j.o = l
j.t = f
j.r = e
e.q = j
e.y = f
e.w = a
e.t = a
e.u = l
e.r = b
e.v = b
e.o = i
i.s = j
i.x = e
i.t = k
i.o = a
i.v = a
i.u = l
g.u = a
g.r = j
f.v = l
f.o = j
f.t = j
f.p = a
f.x = d
k.v = l
k.o = j
k.t = j
k.p = a
k.x = b
d.v = g
d.t = l
d.x = b
assert k.v.z.o.z.t.x.txt == "d"