class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: B = None
        self.r: F = None
        self.t: B = None
        self.y: G = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
j = C("j")
g = D("g")
l = E("l")
k = F("k")
i = G("i")
d = H("d")
h = D("h")

e.q = d
e.o = c
e.t = c
e.u = c
e.p = c
e.r = k
e.y = i
c.y = i
c.x = g
c.v = d
c.z = e
c.u = k
c.o = l
j.q = i
j.s = e
j.o = l
g.v = k
g.w = c
g.t = j
l.q = e
l.u = i
l.s = k
l.p = k
l.r = c
l.x = c
l.t = c
k.o = e
i.u = g
i.r = g
i.q = c
i.s = c
i.y = k
d.x = e
d.o = e
d.y = c
d.u = g
d.t = k
d.r = i
d.z = h
h.v = k
h.w = c
h.t = j
assert c.x.w.o.x.o.q.y.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: B = None
        self.r: F = None
        self.t: B = None
        self.y: G = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
j = C("j")
g = D("g")
l = E("l")
k = F("k")
i = G("i")
d = H("d")
h = D("h")

e.q = d
e.o = c
e.t = c
e.u = c
e.p = c
e.r = k
e.y = i
c.y = i
c.x = g
c.v = d
c.z = e
c.u = k
c.o = l
j.q = i
j.s = e
j.o = l
g.v = k
g.w = c
g.t = j
l.q = e
l.u = i
l.s = k
l.p = k
l.r = c
l.x = c
l.t = c
k.o = e
i.u = g
i.r = g
i.q = c
i.s = c
i.y = k
d.x = e
d.o = e
d.y = c
d.u = g
d.t = k
d.r = i
d.z = h
h.v = k
h.w = c
h.t = j
assert c.x.w.o.x.o.q.y.r.t.txt == "j"