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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.t: I = None
        self.q: G = None
        self.v: G = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.u: G = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.v: D = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: I = None
        self.t: E = None
        self.s: C = None
        self.p: F = None
        self.z: F = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: I = None
        self.t: E = None
        self.y: B = None
        self.x: I = None
        self.p: G = None
        self.s: D = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.t: I = None
        self.q: G = None
        self.v: G = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.u: G = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.v: D = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: I = None
        self.t: E = None
        self.s: C = None
        self.p: F = None
        self.z: F = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: I = None
        self.t: E = None
        self.y: B = None
        self.x: I = None
        self.p: G = None
        self.s: D = None
        self.u: H = None
        self.txt = txt

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

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