class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: F = None
        self.v: A = None
        self.w: E = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: F = None
        self.v: A = None
        self.w: E = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

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

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