class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: I = None
        self.s: H = None
        self.x: I = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.o: H = None
        self.z: I = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.p: B = None
        self.w: I = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.r: A = None
        self.w: I = None
        self.u: C = None
        self.o: C = None
        self.x: I = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: D = None
        self.v: B = None
        self.s: D = None
        self.t: D = None
        self.x: A = None
        self.o: G = None
        self.r: E = None
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.o: H = None
        self.z: I = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.p: B = None
        self.w: I = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.r: A = None
        self.w: I = None
        self.u: C = None
        self.o: C = None
        self.x: I = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: D = None
        self.v: B = None
        self.s: D = None
        self.t: D = None
        self.x: A = None
        self.o: G = None
        self.r: E = None
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.txt = txt

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

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