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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: H = None
        self.p: G = None
        self.o: H = None
        self.t: H = None
        self.r: F = None
        self.q: B = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: H = None
        self.p: G = None
        self.o: H = None
        self.t: H = None
        self.r: F = None
        self.q: B = None
        self.z: E = None
        self.txt = txt

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

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