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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.r: B = None
        self.w: H = None
        self.v: F = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.x: B = None
        self.u: A = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.r: B = None
        self.w: H = None
        self.v: F = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.x: B = None
        self.u: A = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

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

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