class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.v: G = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: C = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: I = None
        self.o: I = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.v: G = None
        self.x: J = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

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

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

k = A("k")
i = B("i")
n = C("n")
l = D("l")
m = E("m")
h = F("h")
e = G("e")
a = H("a")
d = I("d")
g = J("g")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: C = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: I = None
        self.o: I = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.v: G = None
        self.x: J = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

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

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

k = A("k")
i = B("i")
n = C("n")
l = D("l")
m = E("m")
h = F("h")
e = G("e")
a = H("a")
d = I("d")
g = J("g")

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