class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: I = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.v: G = None
        self.o: B = None
        self.p: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.v: G = None
        self.o: B = None
        self.p: B = None
        self.r: G = None
        self.txt = txt

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

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