class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: D = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.v: E = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.v: H = None
        self.t: E = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.v: E = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.v: H = None
        self.t: E = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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