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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.t: G = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: H = None
        self.r: B = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: F = None
        self.r: H = None
        self.w: H = None
        self.z: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.s: G = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.t: G = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: H = None
        self.r: B = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: F = None
        self.r: H = None
        self.w: H = None
        self.z: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.s: G = None
        self.y: F = None
        self.txt = txt

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

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