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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.y: C = None
        self.x: H = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: C = None
        self.o: C = None
        self.z: D = None
        self.r: B = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.y: C = None
        self.x: H = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: C = None
        self.o: C = None
        self.z: D = None
        self.r: B = None
        self.q: F = None
        self.txt = txt

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

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