class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.q: J = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: H = None
        self.r: F = None
        self.v: A = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: B = None
        self.w: B = None
        self.y: B = None
        self.q: J = None
        self.u: C = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.u: I = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.q: J = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: H = None
        self.r: F = None
        self.v: A = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: B = None
        self.w: B = None
        self.y: B = None
        self.q: J = None
        self.u: C = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.u: I = None
        self.p: A = None
        self.w: D = None
        self.txt = txt

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

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