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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.z: A = None
        self.y: C = None
        self.s: A = None
        self.x: F = None
        self.u: E = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.z: A = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.w: D = None
        self.x: E = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

d = A("d")
f = B("f")
n = C("n")
h = D("h")
j = E("j")
c = F("c")
e = G("e")
b = H("b")
m = A("m")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: C = None
        self.z: A = None
        self.y: C = None
        self.s: A = None
        self.x: F = None
        self.u: E = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.z: A = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: F = None
        self.w: D = None
        self.x: E = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

d = A("d")
f = B("f")
n = C("n")
h = D("h")
j = E("j")
c = F("c")
e = G("e")
b = H("b")
m = A("m")

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