class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: H = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.r: F = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: E = None
        self.z: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.r: F = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: E = None
        self.z: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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