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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: E = None
        self.r: F = None
        self.txt = txt

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

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