class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: B = None
        self.y: B = None
        self.v: H = None
        self.w: B = None
        self.o: B = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.r: G = None
        self.u: C = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.y: E = None
        self.v: H = None
        self.t: H = None
        self.p: G = None
        self.w: B = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.r: G = None
        self.u: C = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.y: E = None
        self.v: H = None
        self.t: H = None
        self.p: G = None
        self.w: B = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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