class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: E = None
        self.y: G = None
        self.o: D = None
        self.v: C = None
        self.r: G = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: I = None
        self.r: G = None
        self.u: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.u: D = None
        self.q: E = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: I = None
        self.r: G = None
        self.u: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.u: D = None
        self.q: E = None
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

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

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