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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.s: H = None
        self.x: I = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.y: B = None
        self.z: B = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.w: F = None
        self.o: E = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.s: H = None
        self.x: I = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.y: B = None
        self.z: B = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.w: F = None
        self.o: E = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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