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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: H = None
        self.z: E = None
        self.r: B = None
        self.s: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.r: I = None
        self.y: F = None
        self.v: I = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: H = None
        self.z: E = None
        self.r: B = None
        self.s: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: F = None
        self.r: I = None
        self.y: F = None
        self.v: I = None
        self.w: F = None
        self.txt = txt

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

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

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

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