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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.r: A = None
        self.x: H = None
        self.p: E = None
        self.q: A = None
        self.o: C = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.p: I = None
        self.q: I = None
        self.w: H = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: D = None
        self.w: A = None
        self.o: F = None
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.r: A = None
        self.x: H = None
        self.p: E = None
        self.q: A = None
        self.o: C = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.p: I = None
        self.q: I = None
        self.w: H = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: D = None
        self.w: A = None
        self.o: F = None
        self.p: H = None
        self.v: C = None
        self.txt = txt

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

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