class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.w: E = None
        self.x: F = None
        self.t: D = None
        self.q: G = None
        self.u: F = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.q: I = None
        self.w: F = None
        self.z: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: A = None
        self.y: A = None
        self.o: H = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: F = None
        self.p: D = None
        self.u: I = None
        self.z: C = None
        self.txt = txt

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

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

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

b.v = a
b.r = e
b.x = e
b.u = e
b.w = j
b.s = j
b.t = i
b.q = d
a.t = k
a.p = m
a.q = n
a.s = n
a.w = e
a.z = j
k.t = d
k.s = d
k.u = d
k.z = i
k.v = i
k.o = m
k.q = a
k.x = b
k.y = n
i.p = k
j.z = e
e.u = i
e.s = b
e.y = b
e.o = m
e.w = m
d.s = e
d.o = e
d.p = i
d.u = n
d.z = k
m.r = i
m.t = i
m.s = n
m.u = b
m.z = b
m.x = d
m.o = e
m.y = a
n.t = k
n.p = b
n.v = e
n.w = d
assert e.w.x.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.w: E = None
        self.x: F = None
        self.t: D = None
        self.q: G = None
        self.u: F = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: H = None
        self.q: I = None
        self.w: F = None
        self.z: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: A = None
        self.y: A = None
        self.o: H = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: F = None
        self.p: D = None
        self.u: I = None
        self.z: C = None
        self.txt = txt

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

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

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

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