class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: G = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: E = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: D = None
        self.t: G = None
        self.w: A = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: H = None
        self.x: G = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: E = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: D = None
        self.t: G = None
        self.w: A = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: H = None
        self.x: G = None
        self.z: D = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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