class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.o: C = None
        self.u: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

a.z = f
k.w = j
h.u = c
l.p = n
l.u = n
n.o = l
n.r = l
n.w = k
n.z = k
n.y = k
n.t = j
n.v = j
n.p = c
n.s = m
j.r = n
j.x = h
j.z = l
f.t = l
c.v = n
c.w = a
c.o = h
c.u = j
c.s = j
c.t = l
i.u = m
i.y = m
i.w = m
i.v = a
i.z = l
i.s = l
i.x = l
i.q = n
m.u = i
m.y = i
m.w = i
m.v = a
m.z = l
m.s = l
m.x = l
m.q = n
assert a.z.t.p.w.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.o: C = None
        self.u: F = None
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

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