class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.y: H = None
        self.u: G = None
        self.r: H = None
        self.o: H = None
        self.w: B = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: G = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.y: H = None
        self.u: G = None
        self.r: H = None
        self.o: H = None
        self.w: B = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: G = None
        self.t: E = None
        self.txt = txt

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

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