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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: H = None
        self.p: G = None
        self.r: H = None
        self.q: G = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: H = None
        self.p: G = None
        self.r: H = None
        self.q: G = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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