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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: E = None
        self.y: D = None
        self.x: E = None
        self.p: G = None
        self.r: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.t: D = None
        self.z: B = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.w: B = None
        self.y: H = None
        self.u: A = None
        self.o: F = None
        self.txt = txt

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

e = A("e")
b = B("b")
h = C("h")
i = D("i")
n = E("n")
g = F("g")
f = G("f")
d = H("d")
a = A("a")
j = E("j")

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: E = None
        self.y: D = None
        self.x: E = None
        self.p: G = None
        self.r: H = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: E = None
        self.u: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: C = None
        self.t: D = None
        self.z: B = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.w: B = None
        self.y: H = None
        self.u: A = None
        self.o: F = None
        self.txt = txt

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

e = A("e")
b = B("b")
h = C("h")
i = D("i")
n = E("n")
g = F("g")
f = G("f")
d = H("d")
a = A("a")
j = E("j")

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