class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.p: D = None
        self.w: F = None
        self.r: H = None
        self.s: H = None
        self.o: H = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.q: I = None
        self.v: A = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.q: I = None
        self.v: A = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

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