class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.q: C = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.z: A = None
        self.o: I = None
        self.x: E = None
        self.q: D = None
        self.w: I = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.q: C = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.z: A = None
        self.o: I = None
        self.x: E = None
        self.q: D = None
        self.w: I = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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