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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

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