class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: H = None
        self.s: I = None
        self.p: C = None
        self.x: D = None
        self.r: F = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: I = None
        self.u: F = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.q: D = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: I = None
        self.u: F = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.q: D = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

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

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