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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.z: D = None
        self.w: I = None
        self.q: D = None
        self.r: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: B = None
        self.p: E = None
        self.y: C = None
        self.w: J = None
        self.q: H = None
        self.o: E = None
        self.x: A = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.z: G = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: C = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.z: D = None
        self.w: I = None
        self.q: D = None
        self.r: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: B = None
        self.p: E = None
        self.y: C = None
        self.w: J = None
        self.q: H = None
        self.o: E = None
        self.x: A = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: D = None
        self.z: G = None
        self.q: E = None
        self.txt = txt

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

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