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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: C = None
        self.o: E = None
        self.y: G = None
        self.r: E = None
        self.x: A = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.p: B = None
        self.s: F = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: G = None
        self.u: A = None
        self.w: I = None
        self.s: D = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: C = None
        self.o: E = None
        self.y: G = None
        self.r: E = None
        self.x: A = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: H = None
        self.p: B = None
        self.s: F = None
        self.x: E = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: G = None
        self.u: A = None
        self.w: I = None
        self.s: D = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

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

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