class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.p: H = None
        self.w: E = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.q: H = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.v: B = None
        self.t: G = None
        self.o: A = None
        self.w: E = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.r: E = None
        self.txt = txt

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

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

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

b = A("b")
g = B("g")
e = C("e")
i = D("i")
a = E("a")
m = F("m")
h = G("h")
k = H("k")
j = D("j")
f = E("f")

b.o = a
b.x = a
b.w = a
b.p = k
b.r = h
b.v = h
g.o = m
g.t = j
g.q = k
g.w = f
e.r = b
e.p = k
e.z = k
i.p = e
i.u = b
i.o = b
i.v = g
i.z = g
i.t = h
i.w = a
a.q = k
a.p = h
a.r = f
m.o = g
h.x = i
k.t = b
k.z = b
k.v = g
k.x = g
k.s = g
k.q = g
k.o = m
k.w = f
j.p = e
j.u = b
j.o = b
j.v = g
j.z = g
j.t = h
j.w = a
f.q = k
f.p = h
f.r = a
assert b.x.q.w.r.q.w.r.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.p: H = None
        self.w: E = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.q: H = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.v: B = None
        self.t: G = None
        self.o: A = None
        self.w: E = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.r: E = None
        self.txt = txt

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

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

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

b = A("b")
g = B("g")
e = C("e")
i = D("i")
a = E("a")
m = F("m")
h = G("h")
k = H("k")
j = D("j")
f = E("f")

b.o = a
b.x = a
b.w = a
b.p = k
b.r = h
b.v = h
g.o = m
g.t = j
g.q = k
g.w = f
e.r = b
e.p = k
e.z = k
i.p = e
i.u = b
i.o = b
i.v = g
i.z = g
i.t = h
i.w = a
a.q = k
a.p = h
a.r = f
m.o = g
h.x = i
k.t = b
k.z = b
k.v = g
k.x = g
k.s = g
k.q = g
k.o = m
k.w = f
j.p = e
j.u = b
j.o = b
j.v = g
j.z = g
j.t = h
j.w = a
f.q = k
f.p = h
f.r = a
assert b.x.q.w.r.q.w.r.r.r.txt == "a"