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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.t: F = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.o: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.t: F = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.o: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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