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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.t: C = None
        self.w: I = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.v: E = None
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: B = None
        self.u: D = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.t: C = None
        self.w: I = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.v: E = None
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: B = None
        self.u: D = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

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

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