class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.r: G = None
        self.x: H = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.q: D = None
        self.t: A = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.q: D = None
        self.t: A = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

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

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