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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: F = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: F = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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

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