class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: H = None
        self.v: B = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: G = None
        self.q: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.o: H = None
        self.t: F = None
        self.v: I = None
        self.u: I = None
        self.p: J = None
        self.q: C = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: G = None
        self.q: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.o: H = None
        self.t: F = None
        self.v: I = None
        self.u: I = None
        self.p: J = None
        self.q: C = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: J = None
        self.txt = txt

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

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

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

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