class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: I = None
        self.w: E = None
        self.r: E = None
        self.p: D = None
        self.u: I = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.q: G = None
        self.v: H = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: I = None
        self.w: E = None
        self.r: E = None
        self.p: D = None
        self.u: I = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.q: G = None
        self.v: H = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

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

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