class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: C = None
        self.w: I = None
        self.y: D = None
        self.o: F = None
        self.t: D = None
        self.p: B = None
        self.r: E = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.x: I = None
        self.z: G = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: H = None
        self.p: A = None
        self.z: A = None
        self.y: H = None
        self.x: F = None
        self.r: H = None
        self.q: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

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

l.v = g
l.u = i
l.s = i
l.w = n
l.y = k
l.t = k
l.o = d
l.p = a
l.r = c
a.y = g
a.s = g
a.x = n
a.t = n
a.z = b
a.w = d
i.t = n
i.u = k
k.o = c
k.u = c
k.t = f
k.z = f
k.x = n
k.v = l
k.w = i
c.u = n
d.y = a
b.t = c
b.w = g
b.y = g
b.r = g
b.p = l
b.z = l
b.x = d
b.q = f
g.t = c
g.w = c
n.w = l
n.u = b
n.r = k
n.p = k
n.z = i
n.y = g
n.v = f
n.q = d
n.t = d
f.t = c
f.w = g
f.y = g
f.r = g
f.p = l
f.z = l
f.x = d
f.q = b
assert n.v.q.p.s.u.t.q.t.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: C = None
        self.w: I = None
        self.y: D = None
        self.o: F = None
        self.t: D = None
        self.p: B = None
        self.r: E = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.x: I = None
        self.z: G = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: H = None
        self.p: A = None
        self.z: A = None
        self.y: H = None
        self.x: F = None
        self.r: H = None
        self.q: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

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

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