class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: E = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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