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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: A = None
        self.z: G = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: A = None
        self.z: G = None
        self.t: E = None
        self.txt = txt

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

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