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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: D = None
        self.q: E = None
        self.r: A = None
        self.z: F = None
        self.t: F = None
        self.u: I = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: D = None
        self.q: E = None
        self.r: A = None
        self.z: F = None
        self.t: F = None
        self.u: I = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: B = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: H = None
        self.txt = txt

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

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